VirtualBox

Changeset 88742 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 28, 2021 10:50:44 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8161: A bit of rework for Medium Manager; Listen to UICommon signal to cleanup COM stuff on app shutdown.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r87001 r88742  
    679679}
    680680
     681void UIMediumManagerWidget::sltDetachCOM()
     682{
     683    /* Clear tree-widgets: */
     684    QITreeWidget *pTreeWidgetHD = treeWidget(UIMediumDeviceType_HardDisk);
     685    if (pTreeWidgetHD)
     686        pTreeWidgetHD->clear();
     687    QITreeWidget *pTreeWidgetCD = treeWidget(UIMediumDeviceType_DVD);
     688    if (pTreeWidgetCD)
     689        pTreeWidgetCD->clear();
     690    QITreeWidget *pTreeWidgetFD = treeWidget(UIMediumDeviceType_Floppy);
     691    if (pTreeWidgetFD)
     692        pTreeWidgetFD->clear();
     693}
     694
    681695void UIMediumManagerWidget::prepare()
    682696{
     
    729743    connect(&uiCommon(), &UICommon::sigMediumEnumerationFinished,
    730744            this, &UIMediumManagerWidget::sltHandleMediumEnumerationFinish);
     745
     746    /* Configure COM related connections: */
     747    connect(&uiCommon(), &UICommon::sigAskToDetachCOM,
     748            this, &UIMediumManagerWidget::sltDetachCOM);
    731749}
    732750
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h

    r87342 r88742  
    203203    /** @} */
    204204
    205    /** @name Medium search stuff.
     205    /** @name Medium search stuff.
    206206      * @{ */
    207207        /** Adjusts tree-widgets according content. */
    208208        void sltHandlePerformSearch();
     209    /** @} */
     210
     211    /** @name Medium search stuff.
     212      * @{ */
     213        /** Handles command to detach COM stuff. */
     214        void sltDetachCOM();
    209215    /** @} */
    210216
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