VirtualBox

Changeset 80802 in vbox


Ignore:
Timestamp:
Sep 15, 2019 8:58:27 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133369
Message:

FE/Qt: bugref:8938: VirtualBox Manager: Chooser and Tools pane: Fixing regression introduced by r133351, that's an old bug revealed (not created) by that commit.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r80785 r80802  
    12951295}
    12961296
     1297void UIChooserModel::cleanupConnections()
     1298{
     1299    /* Disconnect selection-changed & selection-invalidated signal prematurelly.
     1300     * Keep in mind, we are using static_cast instead of qobject_cast here to be
     1301     * sure connection is disconnected even if parent is self-destroyed. */
     1302    disconnect(this, &UIChooserModel::sigSelectionChanged,
     1303               static_cast<UIChooser*>(parent()), &UIChooser::sigSelectionChanged);
     1304    disconnect(this, &UIChooserModel::sigSelectionInvalidated,
     1305               static_cast<UIChooser*>(parent()), &UIChooser::sigSelectionInvalidated);
     1306}
     1307
    12971308void UIChooserModel::cleanupHandlers()
    12981309{
     
    13211332void UIChooserModel::cleanup()
    13221333{
     1334    cleanupConnections();
    13231335    cleanupHandlers();
    13241336    cleanupContextMenu();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h

    r80443 r80802  
    309309        void saveLastSelectedItem();
    310310        /** Cleanups connections. */
     311        void cleanupConnections();
     312        /** Cleanups handlers. */
    311313        void cleanupHandlers();
    312314        /** Cleanups context-menu. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp

    r80784 r80802  
    497497    /* Setup parent connections: */
    498498    connect(this, &UIToolsModel::sigSelectionChanged,
    499         qobject_cast<UITools*>(parent()), &UITools::sigSelectionChanged);
     499            qobject_cast<UITools*>(parent()), &UITools::sigSelectionChanged);
    500500    connect(this, &UIToolsModel::sigExpandingStarted,
    501501            qobject_cast<UITools*>(parent()), &UITools::sigExpandingStarted);
     
    539539}
    540540
     541void UIToolsModel::cleanupConnections()
     542{
     543    /* Disconnect selection-changed signal prematurelly.
     544     * Keep in mind, we are using static_cast instead of qobject_cast here to be
     545     * sure connection is disconnected even if parent is self-destroyed. */
     546    disconnect(this, &UIToolsModel::sigSelectionChanged,
     547               static_cast<UITools*>(parent()), &UITools::sigSelectionChanged);
     548}
     549
    541550void UIToolsModel::cleanupHandlers()
    542551{
     
    562571void UIToolsModel::cleanup()
    563572{
     573    /* Cleanup connections: */
     574    cleanupConnections();
    564575    /* Cleanup handlers: */
    565576    cleanupHandlers();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.h

    r76581 r80802  
    225225        void saveLastSelectedItems();
    226226        /** Cleanups connections. */
     227        void cleanupConnections();
     228        /** Cleanups connections. */
    227229        void cleanupHandlers();
    228230        /** Cleanups items. */
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