VirtualBox

Changeset 57128 in vbox


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

FE/Qt: 7962: Runtime UI: Manually cleanup session connections early.

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

Legend:

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

    r56870 r57128  
    243243    /* Cleanup action groups: */
    244244    cleanupActionGroups();
     245
     246    /* Cleanup session connections: */
     247    cleanupSessionConnections();
    245248}
    246249
     
    893896void UIMachineLogic::prepareSessionConnections()
    894897{
    895     /* We should watch for the VBoxSVC availability changes: */
     898    /* We should watch for VBoxSVC availability changes: */
    896899    connect(&vboxGlobal(), SIGNAL(sigVBoxSVCAvailabilityChange()),
    897900            this, SLOT(sltHandleVBoxSVCAvailabilityChange()));
    898901
    899     /* We should check for entering/exiting requested modes: */
     902    /* We should watch for requested modes: */
    900903    connect(uisession(), SIGNAL(sigInitialized()), this, SLOT(sltCheckForRequestedVisualStateType()));
    901904    connect(uisession(), SIGNAL(sigAdditionsStateChange()), this, SLOT(sltCheckForRequestedVisualStateType()));
    902905
    903     /* Machine state-change updater: */
     906    /* We should watch for console events: */
    904907    connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));
    905 
    906     /* Guest additions state-change updater: */
    907908    connect(uisession(), SIGNAL(sigAdditionsStateActualChange()), this, SLOT(sltAdditionsStateChanged()));
    908 
    909     /* Mouse capability state-change updater: */
    910909    connect(uisession(), SIGNAL(sigMouseCapabilityChange()), this, SLOT(sltMouseCapabilityChanged()));
    911 
    912     /* Keyboard LEDs state-change updater: */
    913910    connect(uisession(), SIGNAL(sigKeyboardLedsChange()), this, SLOT(sltKeyboardLedsChanged()));
    914 
    915     /* USB devices state-change updater: */
    916911    connect(uisession(), SIGNAL(sigUSBDeviceStateChange(const CUSBDevice &, bool, const CVirtualBoxErrorInfo &)),
    917912            this, SLOT(sltUSBDeviceStateChange(const CUSBDevice &, bool, const CVirtualBoxErrorInfo &)));
    918 
    919     /* Runtime errors notifier: */
    920913    connect(uisession(), SIGNAL(sigRuntimeError(bool, const QString &, const QString &)),
    921914            this, SLOT(sltRuntimeError(bool, const QString &, const QString &)));
    922 
    923915#ifdef Q_WS_MAC
    924     /* Show windows: */
    925916    connect(uisession(), SIGNAL(sigShowWindows()), this, SLOT(sltShowWindows()));
    926917#endif /* Q_WS_MAC */
    927 
    928     /* Guest-monitor-change updater: */
    929918    connect(uisession(), SIGNAL(sigGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)),
    930919            this, SLOT(sltGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)));
    931920
    932     /* Host-screen-change updaters: */
     921    /* We should watch for host-screen-change events: */
    933922    connect(uisession(), SIGNAL(sigHostScreenCountChange()), this, SLOT(sltHostScreenCountChange()));
    934923    connect(uisession(), SIGNAL(sigHostScreenGeometryChange()), this, SLOT(sltHostScreenGeometryChange()));
    935924    connect(uisession(), SIGNAL(sigHostScreenAvailableAreaChange()), this, SLOT(sltHostScreenAvailableAreaChange()));
    936925
    937     /* Frame-buffer connections: */
     926    /* We should notify about frame-buffer events: */
    938927    connect(this, SIGNAL(sigFrameBufferResize()), uisession(), SIGNAL(sigFrameBufferResize()));
    939928}
     
    12821271}
    12831272
     1273void UIMachineLogic::cleanupSessionConnections()
     1274{
     1275    /* We should stop watching for VBoxSVC availability changes: */
     1276    disconnect(&vboxGlobal(), SIGNAL(sigVBoxSVCAvailabilityChange()),
     1277               this, SLOT(sltHandleVBoxSVCAvailabilityChange()));
     1278
     1279    /* We should stop watching for requested modes: */
     1280    disconnect(uisession(), SIGNAL(sigInitialized()), this, SLOT(sltCheckForRequestedVisualStateType()));
     1281    disconnect(uisession(), SIGNAL(sigAdditionsStateChange()), this, SLOT(sltCheckForRequestedVisualStateType()));
     1282
     1283    /* We should stop watching for console events: */
     1284    disconnect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));
     1285    disconnect(uisession(), SIGNAL(sigAdditionsStateActualChange()), this, SLOT(sltAdditionsStateChanged()));
     1286    disconnect(uisession(), SIGNAL(sigMouseCapabilityChange()), this, SLOT(sltMouseCapabilityChanged()));
     1287    disconnect(uisession(), SIGNAL(sigKeyboardLedsChange()), this, SLOT(sltKeyboardLedsChanged()));
     1288    disconnect(uisession(), SIGNAL(sigUSBDeviceStateChange(const CUSBDevice &, bool, const CVirtualBoxErrorInfo &)),
     1289               this, SLOT(sltUSBDeviceStateChange(const CUSBDevice &, bool, const CVirtualBoxErrorInfo &)));
     1290    disconnect(uisession(), SIGNAL(sigRuntimeError(bool, const QString &, const QString &)),
     1291               this, SLOT(sltRuntimeError(bool, const QString &, const QString &)));
     1292#ifdef Q_WS_MAC
     1293    disconnect(uisession(), SIGNAL(sigShowWindows()), this, SLOT(sltShowWindows()));
     1294#endif /* Q_WS_MAC */
     1295    disconnect(uisession(), SIGNAL(sigGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)),
     1296               this, SLOT(sltGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)));
     1297
     1298    /* We should stop watching for host-screen-change events: */
     1299    disconnect(uisession(), SIGNAL(sigHostScreenCountChange()), this, SLOT(sltHostScreenCountChange()));
     1300    disconnect(uisession(), SIGNAL(sigHostScreenGeometryChange()), this, SLOT(sltHostScreenGeometryChange()));
     1301    disconnect(uisession(), SIGNAL(sigHostScreenAvailableAreaChange()), this, SLOT(sltHostScreenAvailableAreaChange()));
     1302
     1303    /* We should stop notify about frame-buffer events: */
     1304    disconnect(this, SIGNAL(sigFrameBufferResize()), uisession(), SIGNAL(sigFrameBufferResize()));
     1305}
     1306
    12841307bool UIMachineLogic::eventFilter(QObject *pWatched, QEvent *pEvent)
    12851308{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r56443 r57128  
    239239    virtual void cleanupActionConnections() {}
    240240    virtual void cleanupActionGroups() {}
    241     //virtual void cleanupSessionConnections() {}
     241    virtual void cleanupSessionConnections();
    242242    //virtual void cleanupRequiredFeatures() {}
    243243
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