VirtualBox

Ignore:
Timestamp:
Aug 21, 2012 11:17:21 AM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: Do not create network-manager indicator for VM-console process.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/net
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkManager.cpp

    r41461 r42901  
    9292
    9393UINetworkManager::UINetworkManager()
     94    : m_pNetworkManagerDialog(0)
     95    , m_pNetworkManagerIndicator(0)
    9496{
    9597    /* Prepare instance: */
     
    110112
    111113    /* Prepare network-manager state-indicator: */
    112     m_pNetworkManagerIndicator = new UINetworkManagerIndicator;
    113     connect(m_pNetworkManagerIndicator, SIGNAL(mouseDoubleClicked(QIStateIndicator *, QMouseEvent *)), this, SLOT(show()));
     114    if (!vboxGlobal().isVMConsoleProcess())
     115    {
     116        m_pNetworkManagerIndicator = new UINetworkManagerIndicator;
     117        connect(m_pNetworkManagerIndicator, SIGNAL(mouseDoubleClicked(QIStateIndicator *, QMouseEvent *)), this, SLOT(show()));
     118    }
    114119}
    115120
     
    120125
    121126    /* Cleanup network-manager state-indicator: */
    122     delete m_pNetworkManagerIndicator;
     127    if (!vboxGlobal().isVMConsoleProcess())
     128    {
     129        delete m_pNetworkManagerIndicator;
     130        m_pNetworkManagerIndicator = 0;
     131    }
    123132
    124133    /* Cleanup network-manager dialog: */
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkRequest.cpp

    r42526 r42901  
    7474
    7575    /* Remove network-request description from network-manager state-indicator: */
    76     m_pNetworkManagerIndicator->removeNetworkRequest(m_uuid);
     76    if (m_pNetworkManagerIndicator)
     77        m_pNetworkManagerIndicator->removeNetworkRequest(m_uuid);
    7778
    7879    /* Remove network-request widget from network-manager dialog: */
     
    185186
    186187    /* Create network-request description in network-manager state-indicator: */
    187     m_pNetworkManagerIndicator->addNetworkRequest(this);
     188    if (m_pNetworkManagerIndicator)
     189        m_pNetworkManagerIndicator->addNetworkRequest(this);
    188190
    189191    /* Choose first network-request as current: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette