VirtualBox

Ignore:
Timestamp:
May 28, 2018 4:39:19 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9049: Small cleanup for UIStarter: Removing sltDestroyUI, it's the only part of cleanup anyway.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.cpp

    r72360 r72361  
    7676}
    7777
    78 void UIStarter::prepare()
    79 {
    80     /* Listen for QApplication signals: */
    81     connect(qApp, &QGuiApplication::aboutToQuit,
    82             this, &UIStarter::sltDestroyUI);
    83 }
    84 
    8578void UIStarter::init()
    8679{
     
    10396}
    10497
    105 void UIStarter::cleanup()
    106 {
    107     /* Destroy UI if there is still something to: */
    108     sltDestroyUI();
     98void UIStarter::prepare()
     99{
     100    /* Listen for QApplication signals: */
     101    connect(qApp, &QGuiApplication::aboutToQuit,
     102            this, &UIStarter::cleanup);
    109103}
    110104
     
    153147    }
    154148# if defined(VBOX_GUI_WITH_SHARED_LIBRARY) && defined(VBOX_RUNTIME_UI)
     149    /* Show the error message otherwise and quit: */
    155150    else
    156151    {
    157         /* Show the error message otherwise: */
    158152        msgCenter().cannotStartRuntime();
    159153        return QApplication::quit();
     
    172166}
    173167
    174 void UIStarter::sltDestroyUI()
     168void UIStarter::cleanup()
    175169{
    176170#if !defined(VBOX_GUI_WITH_SHARED_LIBRARY) || !defined(VBOX_RUNTIME_UI)
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.h

    r72360 r72361  
    3333    virtual ~UIStarter() /* override */;
    3434
    35     /** Prepares everything. */
    36     void prepare();
    37     /** Cleanups everything. */
    38     void cleanup();
    39 
    4035public:
    4136
     
    5550private slots:
    5651
     52    /** Prepares everything. */
     53    void prepare();
     54
    5755    /** Starts corresponding part of the UI. */
    5856    void sltStartUI();
    5957    /** Restarts corresponding part of the UI. */
    6058    void sltRestartUI();
    61     /** Destroys corresponding part of the UI. */
    62     void sltDestroyUI();
     59
     60    /** Cleanups everything. */
     61    void cleanup();
    6362
    6463    /** Opens URLs in Selector UI. */
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