VirtualBox

Changeset 26799 in vbox


Ignore:
Timestamp:
Feb 25, 2010 2:26:23 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: new core: don't recreated the menus all the time

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r26773 r26799  
    439439}
    440440
    441 void UIMachineWindow::sltPrepareMenuMachine()
     441void UIMachineWindow::prepareMenuMachine()
    442442{
    443443    QMenu *menu = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Machine)->menu();
     
    470470}
    471471
    472 void UIMachineWindow::sltPrepareMenuDevices()
     472void UIMachineWindow::prepareMenuDevices()
    473473{
    474474    QMenu *menu = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Devices)->menu();
     
    489489
    490490#ifdef VBOX_WITH_DEBUGGER_GUI
    491 void UIMachineWindow::sltPrepareMenuDebug()
     491void UIMachineWindow::prepareMenuDebug()
    492492{
    493493    QMenu *menu = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Debug)->menu();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r26773 r26799  
    7171    virtual void prepareWindowIcon();
    7272    virtual void prepareConsoleConnections();
     73    virtual void prepareMenuMachine();
     74    virtual void prepareMenuDevices();
     75#ifdef VBOX_WITH_DEBUGGER_GUI
     76    virtual void prepareMenuDebug();
     77#endif
    7378    virtual void loadWindowSettings();
    7479
     
    8388    /* Protected slots: */
    8489    void sltMachineStateChanged(KMachineState machineState);
    85     void sltPrepareMenuMachine();
    86     void sltPrepareMenuDevices();
    87 #ifdef VBOX_WITH_DEBUGGER_GUI
    88     void sltPrepareMenuDebug();
    89 #endif
    9090
    9191    /* Protected variables: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r26773 r26799  
    129129}
    130130
    131 void UIMachineWindowNormal::sltPrepareMenuMachine()
    132 {
    133     UIMachineWindow::sltPrepareMenuMachine();
    134 }
    135 
    136 void UIMachineWindowNormal::sltPrepareMenuDevices()
    137 {
    138     UIMachineWindow::sltPrepareMenuDevices();
    139 }
    140 
    141 #ifdef VBOX_WITH_DEBUGGER_GUI
    142 void UIMachineWindowNormal::sltPrepareMenuDebug()
    143 {
    144     UIMachineWindow::sltPrepareMenuDebug();
    145 }
    146 #endif
    147 
    148131void UIMachineWindowNormal::sltTryClose()
    149132{
     
    360343    /* Machine submenu: */
    361344    QMenu *pMenuMachine = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Machine)->menu();
     345    UIMachineWindow::prepareMenuMachine();
    362346    menuBar()->addMenu(pMenuMachine);
    363     connect(pMenuMachine, SIGNAL(aboutToShow()), this, SLOT(sltPrepareMenuMachine()));
    364347
    365348    /* Devices submenu: */
    366349    QMenu *pMenuDevices = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Devices)->menu();
     350    UIMachineWindow::prepareMenuDevices();
    367351    menuBar()->addMenu(pMenuDevices);
    368     connect(pMenuDevices, SIGNAL(aboutToShow()), this, SLOT(sltPrepareMenuDevices()));
    369352
    370353#ifdef VBOX_WITH_DEBUGGER_GUI
     
    372355    {
    373356        QMenu *pMenuDebug = machineLogic()->actionsPool()->action(UIActionIndex_Menu_Debug)->menu();
     357        UIMachineWindow::prepareMenuDebug();
    374358        menuBar()->addMenu(pMenuDebug);
    375         connect(pMenuDebug, SIGNAL(aboutToShow()), this, SLOT(sltPrepareMenuDebug()));
    376359    }
    377360#endif
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h

    r26773 r26799  
    6060    void sltSharedFolderChange();
    6161
    62     /* Runtime menus: */
    63     void sltPrepareMenuMachine();
    64     void sltPrepareMenuDevices();
    65 #ifdef VBOX_WITH_DEBUGGER_GUI
    66     void sltPrepareMenuDebug();
    67 #endif
    68 
    6962    /* LED connections: */
    7063    void sltUpdateIndicators();
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