VirtualBox

Changeset 98928 in vbox


Ignore:
Timestamp:
Mar 13, 2023 10:37:02 AM (21 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Notification-center: Reworking r156239 the way that the model cleanup should clean the tree itself, no need for separate redundant handler.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp

    r98903 r98928  
    396396
    397397    /* Cleanup items first: */
    398     qDeleteAll(m_items);
    399     m_items.clear();
     398    cleanup();
    400399
    401400    /* Populate model contents again: */
     
    514513}
    515514
    516 void UINotificationCenter::sltDetachCOM()
    517 {
    518     cleanup();
    519 }
    520 
    521515void UINotificationCenter::prepare()
    522516{
     
    527521    if (parent())
    528522        parent()->installEventFilter(this);
    529 
    530     /* Prepare alignment: */
    531     m_enmAlignment = gEDataManager->notificationCenterAlignment();
    532     connect(gEDataManager, &UIExtraDataManager::sigNotificationCenterAlignmentChange,
    533             this, &UINotificationCenter::sltHandleAlignmentChange);
    534     /* Prepare order: */
    535     m_enmOrder = gEDataManager->notificationCenterOrder();
    536     connect(gEDataManager, &UIExtraDataManager::sigNotificationCenterOrderChange,
    537             this, &UINotificationCenter::sltHandleOrderChange);
    538523
    539524    /* Prepare the rest of stuff: */
     
    543528    prepareOpenTimer();
    544529
    545     /* COM related connections: */
    546     connect(&uiCommon(), &UICommon::sigAskToDetachCOM,
    547             this, &UINotificationCenter::sltDetachCOM);
     530    /* Prepare alignment: */
     531    m_enmAlignment = gEDataManager->notificationCenterAlignment();
     532    connect(gEDataManager, &UIExtraDataManager::sigNotificationCenterAlignmentChange,
     533            this, &UINotificationCenter::sltHandleAlignmentChange);
     534    sltHandleAlignmentChange();
     535    /* Prepare order: */
     536    m_enmOrder = gEDataManager->notificationCenterOrder();
     537    connect(gEDataManager, &UIExtraDataManager::sigNotificationCenterOrderChange,
     538            this, &UINotificationCenter::sltHandleOrderChange);
     539    sltHandleOrderChange();
    548540
    549541    /* Apply language settings: */
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h

    r98903 r98928  
    140140      * @note Breaks blocking handleNow() call. */
    141141    void sltHandleProgressFinished();
    142 
    143     /** Handles request to detach COM. */
    144     void sltDetachCOM();
    145142
    146143private:
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationModel.cpp

    r98103 r98928  
    145145    /* Wipe out all the objects: */
    146146    foreach (const QUuid &uId, m_ids)
    147         delete m_objects.value(uId);
     147        revokeObject(uId);
    148148    m_objects.clear();
    149149    m_ids.clear();
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