VirtualBox

Changeset 57129 in vbox


Ignore:
Timestamp:
Jul 30, 2015 12:57:20 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101867
Message:

FE/Qt: 7962: Runtime UI: Manually cleanup session connections early for machine-window(s) as well; same as r101866, unrelated to crash but useful.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r56443 r57129  
    444444void UIMachineWindow::prepareSessionConnections()
    445445{
    446     /* Machine state-change updater: */
     446    /* We should watch for console events: */
    447447    connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));
    448448}
     
    523523    UIMachineView::destroy(m_pMachineView);
    524524    m_pMachineView = 0;
     525}
     526
     527void UIMachineWindow::cleanupSessionConnections()
     528{
     529    /* We should stop watching for console events: */
     530    disconnect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));
    525531}
    526532
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r57102 r57129  
    148148    virtual void cleanupMenu() {}
    149149    virtual void cleanupMainLayout() {}
    150     virtual void cleanupSessionConnections() {}
     150    virtual void cleanupSessionConnections();
    151151
    152152    /* Update stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r54299 r57129  
    214214    UIMachineWindow::prepareSessionConnections();
    215215
    216     /* Medium change updater: */
     216    /* We should watch for console events: */
    217217    connect(machineLogic()->uisession(), SIGNAL(sigMediumChange(const CMediumAttachment &)),
    218218            this, SLOT(sltMediumChange(const CMediumAttachment &)));
    219 
    220     /* USB controller change updater: */
    221219    connect(machineLogic()->uisession(), SIGNAL(sigUSBControllerChange()),
    222220            this, SLOT(sltUSBControllerChange()));
    223 
    224     /* USB device state-change updater: */
    225221    connect(machineLogic()->uisession(), SIGNAL(sigUSBDeviceStateChange(const CUSBDevice &, bool, const CVirtualBoxErrorInfo &)),
    226222            this, SLOT(sltUSBDeviceStateChange()));
    227 
    228     /* Network adapter change updater: */
    229223    connect(machineLogic()->uisession(), SIGNAL(sigNetworkAdapterChange(const CNetworkAdapter &)),
    230224            this, SLOT(sltNetworkAdapterChange()));
    231 
    232     /* Shared folder change updater: */
    233225    connect(machineLogic()->uisession(), SIGNAL(sigSharedFolderChange()),
    234226            this, SLOT(sltSharedFolderChange()));
    235 
    236     /* Video capture change updater: */
    237227    connect(machineLogic()->uisession(), SIGNAL(sigVideoCaptureChange()),
    238228            this, SLOT(sltVideoCaptureChange()));
    239 
    240     /* CPU execution cap change updater: */
    241229    connect(machineLogic()->uisession(), SIGNAL(sigCPUExecutionCapChange()),
    242230            this, SLOT(sltCPUExecutionCapChange()));
     
    402390    /* Call to base-class: */
    403391    UIMachineWindow::saveSettings();
     392}
     393
     394void UIMachineWindowNormal::cleanupSessionConnections()
     395{
     396    /* We should stop watching for console events: */
     397    disconnect(machineLogic()->uisession(), SIGNAL(sigMediumChange(const CMediumAttachment &)),
     398               this, SLOT(sltMediumChange(const CMediumAttachment &)));
     399    disconnect(machineLogic()->uisession(), SIGNAL(sigUSBControllerChange()),
     400               this, SLOT(sltUSBControllerChange()));
     401    disconnect(machineLogic()->uisession(), SIGNAL(sigUSBDeviceStateChange(const CUSBDevice &, bool, const CVirtualBoxErrorInfo &)),
     402               this, SLOT(sltUSBDeviceStateChange()));
     403    disconnect(machineLogic()->uisession(), SIGNAL(sigNetworkAdapterChange(const CNetworkAdapter &)),
     404               this, SLOT(sltNetworkAdapterChange()));
     405    disconnect(machineLogic()->uisession(), SIGNAL(sigSharedFolderChange()),
     406               this, SLOT(sltSharedFolderChange()));
     407    disconnect(machineLogic()->uisession(), SIGNAL(sigVideoCaptureChange()),
     408               this, SLOT(sltVideoCaptureChange()));
     409    disconnect(machineLogic()->uisession(), SIGNAL(sigCPUExecutionCapChange()),
     410               this, SLOT(sltCPUExecutionCapChange()));
     411
     412    /* Call to base-class: */
     413    UIMachineWindow::cleanupSessionConnections();
    404414}
    405415
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h

    r57027 r57129  
    9797    /** Save settings routine. */
    9898    void saveSettings();
     99    /** Cleanup session connections routine. */
     100    void cleanupSessionConnections();
    99101
    100102    /** Updates visibility according to visual-state. */
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