VirtualBox

Changeset 98903 in vbox


Ignore:
Timestamp:
Mar 10, 2023 3:17:47 PM (21 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: Moving notification-center init/deinit from UISession to UIMachine as we are planning to handle notifications for stuff before COM init as well; This also requires COM detach handler in notification-center itself.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
6 edited

Legend:

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

    r98309 r98903  
    514514}
    515515
     516void UINotificationCenter::sltDetachCOM()
     517{
     518    cleanup();
     519}
     520
    516521void UINotificationCenter::prepare()
    517522{
     
    537542    prepareStateMachineSliding();
    538543    prepareOpenTimer();
     544
     545    /* COM related connections: */
     546    connect(&uiCommon(), &UICommon::sigAskToDetachCOM,
     547            this, &UINotificationCenter::sltDetachCOM);
    539548
    540549    /* Apply language settings: */
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h

    r98309 r98903  
    140140      * @note Breaks blocking handleNow() call. */
    141141    void sltHandleProgressFinished();
     142
     143    /** Handles request to detach COM. */
     144    void sltDetachCOM();
    142145
    143146private:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r98902 r98903  
    14661466
    14671467    /* Prepare stuff: */
     1468    prepareNotificationCenter();
    14681469    prepareBranding();
    14691470    prepareSessionConnections();
     
    14891490    /* True by default: */
    14901491    return true;
     1492}
     1493
     1494void UIMachine::prepareNotificationCenter()
     1495{
     1496    UINotificationCenter::create();
    14911497}
    14921498
     
    18211827}
    18221828
     1829void UIMachine::cleanupNotificationCenter()
     1830{
     1831    UINotificationCenter::destroy();
     1832}
     1833
    18231834void UIMachine::cleanup()
    18241835{
     
    18311842    cleanupActions();
    18321843    cleanupBranding();
     1844    cleanupNotificationCenter();
    18331845
    18341846    /* Cleanup session UI: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h

    r98882 r98903  
    838838    /** Prepare routine. */
    839839    bool prepare();
     840    /** Prepares notification-center. */
     841    void prepareNotificationCenter();
    840842    /** Prepare routine: Branding. */
    841843    void prepareBranding();
     
    863865    /** Cleanup routine: Session stuff. */
    864866    void cleanupSession();
     867    /** Cleanups notification-center. */
     868    void cleanupNotificationCenter();
    865869    /** Cleanup routine. */
    866870    void cleanup();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r98902 r98903  
    128128{
    129129    /* Prepare COM stuff: */
    130     if (!prepareSession())
     130    if (!prepareCOMStuff())
    131131        return false;
    132132
     
    136136
    137137    /* Prepare GUI stuff: */
    138     prepareNotificationCenter();
    139138    prepareConsoleEventHandlers();
    140139    prepareFramebuffers();
     
    22382237    cleanupFramebuffers();
    22392238    cleanupConsoleEventHandlers();
    2240     cleanupNotificationCenter();
    22412239    cleanupCOMStuff();
    22422240}
     
    23312329}
    23322330
    2333 bool UISession::prepareSession()
     2331bool UISession::prepareCOMStuff()
    23342332{
    23352333    /* Open session: */
     
    23852383    /* True by default: */
    23862384    return true;
    2387 }
    2388 
    2389 void UISession::prepareNotificationCenter()
    2390 {
    2391     UINotificationCenter::create();
    23922385}
    23932386
     
    25042497}
    25052498
    2506 void UISession::cleanupNotificationCenter()
    2507 {
    2508     UINotificationCenter::destroy();
    2509 }
    2510 
    25112499void UISession::cleanupCOMStuff()
    25122500{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r98902 r98903  
    648648    /** @name Prepare/cleanup cascade.
    649649     ** @{ */
    650         /** Prepares COM session. */
    651         bool prepareSession();
    652         /** Prepares notification-center. */
    653         void prepareNotificationCenter();
     650        /** Prepares COM stuff. */
     651        bool prepareCOMStuff();
    654652        /** Prepares console event-handler. */
    655653        void prepareConsoleEventHandlers();
     
    665663        /** Cleanups console event-handler. */
    666664        void cleanupConsoleEventHandlers();
    667         /** Cleanups notification-center. */
    668         void cleanupNotificationCenter();
    669665        /** Cleanups COM stuff. */
    670666        void cleanupCOMStuff();
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