VirtualBox

Changeset 27310 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 12, 2010 1:29:09 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
58722
Message:

FE/Qt4: New running VM core: Move "Power Up" function into UISession.

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

Legend:

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

    r27300 r27310  
    3737#include "VBoxVMSettingsNetwork.h"
    3838#include "VBoxVMSettingsSF.h"
    39 #include "UIFirstRunWzd.h"
    4039#ifdef Q_WS_MAC
    4140# include "DockIconPreview.h"
     
    424423    , m_pRunningOrPausedActions(0)
    425424    , m_fIsWindowsCreated(false)
    426     , m_fIsMachineStarted(false)
    427425    , m_fIsPreventAutoStart(false)
    428426    , m_fIsPreventAutoClose(false)
     
    472470    }
    473471#endif /* Q_WS_MAC */
    474 }
    475 
    476 void UIMachineLogic::tryToStartMachine()
    477 {
    478     /* If we are started already => just return: */
    479     if (m_fIsMachineStarted || uisession()->isRunning() || uisession()->isPaused())
    480         return;
    481 
    482     /* Prepare console powerup: */
    483     prepareConsolePowerUp();
    484 
    485     /* Get current machine/console: */
    486     CMachine machine = session().GetMachine();
    487     CConsole console = session().GetConsole();
    488 
    489     /* Start VM: */
    490     CProgress progress = vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled() ?
    491                          console.PowerUpPaused() : console.PowerUp();
    492 
    493 #if 0 // TODO: Check immediate failure!
    494     /* Check for an immediate failure: */
    495     if (!console.isOk())
    496     {
    497         vboxProblem().cannotStartMachine(console);
    498         machineWindowWrapper()->machineWindow()->close();
    499         return;
    500     }
    501 
    502     /* Disable auto-closure because we want to have a chance to show the error dialog on startup failure: */
    503     setPreventAutoClose(true);
    504 #endif
    505 
    506     /* Show "Starting/Restoring" progress dialog: */
    507     if (uisession()->isSaved())
    508         vboxProblem().showModalProgressDialog(progress, machine.GetName(), defaultMachineWindow()->machineWindow(), 0);
    509     else
    510         vboxProblem().showModalProgressDialog(progress, machine.GetName(), defaultMachineWindow()->machineWindow());
    511 
    512 #if 0 // TODO: Check immediate failure!
    513     /* Check for an progress failure */
    514     if (progress.GetResultCode() != 0)
    515     {
    516         vboxProblem().cannotStartMachine(progress);
    517         machineWindowWrapper()->machineWindow()->close();
    518         return;
    519     }
    520 
    521     /* Enable auto-closure again: */
    522     setPreventAutoClose(false);
    523 
    524     /* Check if we missed a really quick termination after successful startup, and process it if we did: */
    525     if (uisession()->isTurnedOff())
    526     {
    527         machineWindowWrapper()->machineWindow()->close();
    528         return;
    529     }
    530 #endif
    531 
    532 #if 0 // TODO: Rework debugger logic!
    533 # ifdef VBOX_WITH_DEBUGGER_GUI
    534     /* Open the debugger in "full screen" mode requested by the user. */
    535     else if (vboxGlobal().isDebuggerAutoShowEnabled())
    536     {
    537         /* console in upper left corner of the desktop. */
    538         QRect rct (0, 0, 0, 0);
    539         QDesktopWidget *desktop = QApplication::desktop();
    540         if (desktop)
    541             rct = desktop->availableGeometry(pos());
    542         move (QPoint (rct.x(), rct.y()));
    543 
    544         if (vboxGlobal().isDebuggerAutoShowStatisticsEnabled())
    545             sltShowDebugStatistics();
    546         if (vboxGlobal().isDebuggerAutoShowCommandLineEnabled())
    547             sltShowDebugCommandLine();
    548 
    549         if (!vboxGlobal().isStartPausedEnabled())
    550             machineWindowWrapper()->machineView()->pause (false);
    551     }
    552 # endif
    553 #endif
    554 
    555 #ifdef VBOX_WITH_UPDATE_REQUEST
    556     /* Check for updates if necessary: */
    557     vboxGlobal().showUpdateDialog(false /* force request? */);
    558 #endif
    559 
    560     /* Remember what machine was started already: */
    561     m_fIsMachineStarted = true;
    562 
    563     /* Warn listeners about machine was started: */
    564     emit sigMachineStarted();
    565472}
    566473
     
    587494#endif /* Q_WS_MAC */
    588495
    589 void UIMachineLogic::prepareConnections()
    590 {
    591     /* Connect common handlers: */
    592     connect(this, SIGNAL(sigMachineStarted()), this, SLOT(sltCheckRequestedModes()));
    593 }
    594 
    595 void UIMachineLogic::prepareConsoleConnections()
    596 {
     496void UIMachineLogic::prepareSessionConnections()
     497{
     498    /* Machine power-up notifier: */
     499    connect(uisession(), SIGNAL(sigMachineStarted()), this, SLOT(sltCheckRequestedModes()));
     500
    597501    /* Machine state-change updater: */
    598502    connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged()));
     
    611515    connect(uisession(), SIGNAL(sigRuntimeError(bool, const QString &, const QString &)),
    612516            this, SLOT(sltRuntimeError(bool, const QString &, const QString &)));
    613 }
    614 
    615 void UIMachineLogic::prepareActionGroups()
    616 {
    617 #ifdef Q_WS_MAC
    618     /* On Mac OS X, all QMenu's are consumed by Qt after they are added to
    619      * another QMenu or a QMenuBar. This means we have to recreate all QMenus
    620      * when creating a new QMenuBar. */
    621     uisession()->actionsPool()->createMenus();
    622 #endif /* Q_WS_MAC */
    623 
    624     /* Create group for all actions that are enabled only when the VM is running.
    625      * Note that only actions whose enabled state depends exclusively on the
    626      * execution state of the VM are added to this group. */
    627     m_pRunningActions = new QActionGroup(this);
    628     m_pRunningActions->setExclusive(false);
    629 
    630     /* Create group for all actions that are enabled when the VM is running or paused.
    631      * Note that only actions whose enabled state depends exclusively on the
    632      * execution state of the VM are added to this group. */
    633     m_pRunningOrPausedActions = new QActionGroup(this);
    634     m_pRunningOrPausedActions->setExclusive(false);
    635 
    636     /* Move actions into running actions group: */
    637     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Fullscreen));
    638     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Seamless));
    639     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize));
    640     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_AdjustWindow));
    641     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_TypeCAD));
    642 #ifdef Q_WS_X11
    643     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_TypeCABS));
    644 #endif
    645     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_Reset));
    646     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_Shutdown));
    647 #ifdef VBOX_WITH_DEBUGGER_GUI
    648     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_Statistics));
    649     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_CommandLine));
    650     m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Logging));
    651 #endif
    652 
    653     /* Move actions into running-n-paused actions group: */
    654     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_MouseIntegration));
    655     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Toggle_MouseIntegration));
    656     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_TakeSnapshot));
    657     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_InformationDialog));
    658     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Pause));
    659     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_Close));
    660     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_OpticalDevices));
    661     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_FloppyDevices));
    662     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_USBDevices));
    663     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_NetworkAdapters));
    664     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_NetworkAdaptersDialog));
    665     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_SharedFolders));
    666     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_SharedFoldersDialog));
    667     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Toggle_VRDP));
    668     m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_InstallGuestTools));
    669517}
    670518
     
    726574}
    727575
     576void UIMachineLogic::prepareActionGroups()
     577{
     578#ifdef Q_WS_MAC
     579    /* On Mac OS X, all QMenu's are consumed by Qt after they are added to
     580     * another QMenu or a QMenuBar. This means we have to recreate all QMenus
     581     * when creating a new QMenuBar. */
     582    uisession()->actionsPool()->createMenus();
     583#endif /* Q_WS_MAC */
     584
     585    /* Create group for all actions that are enabled only when the VM is running.
     586     * Note that only actions whose enabled state depends exclusively on the
     587     * execution state of the VM are added to this group. */
     588    m_pRunningActions = new QActionGroup(this);
     589    m_pRunningActions->setExclusive(false);
     590
     591    /* Create group for all actions that are enabled when the VM is running or paused.
     592     * Note that only actions whose enabled state depends exclusively on the
     593     * execution state of the VM are added to this group. */
     594    m_pRunningOrPausedActions = new QActionGroup(this);
     595    m_pRunningOrPausedActions->setExclusive(false);
     596
     597    /* Move actions into running actions group: */
     598    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Fullscreen));
     599    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Seamless));
     600    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize));
     601    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_AdjustWindow));
     602    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_TypeCAD));
     603#ifdef Q_WS_X11
     604    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_TypeCABS));
     605#endif
     606    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_Reset));
     607    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_Shutdown));
     608#ifdef VBOX_WITH_DEBUGGER_GUI
     609    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_Statistics));
     610    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Simple_CommandLine));
     611    m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Logging));
     612#endif
     613
     614    /* Move actions into running-n-paused actions group: */
     615    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_MouseIntegration));
     616    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Toggle_MouseIntegration));
     617    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_TakeSnapshot));
     618    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_InformationDialog));
     619    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Pause));
     620    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_Close));
     621    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_OpticalDevices));
     622    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_FloppyDevices));
     623    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_USBDevices));
     624    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_NetworkAdapters));
     625    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_NetworkAdaptersDialog));
     626    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Menu_SharedFolders));
     627    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_SharedFoldersDialog));
     628    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Toggle_VRDP));
     629    m_pRunningOrPausedActions->addAction(actionsPool()->action(UIActionIndex_Simple_InstallGuestTools));
     630}
     631
    728632#ifdef Q_WS_MAC
    729633void UIMachineLogic::prepareDock()
     
    835739    if (isPreventAutoStart())
    836740        QTimer::singleShot(0, uisession(), SLOT(sltCloseVirtualSession()));
    837 }
    838 
    839 void UIMachineLogic::prepareConsolePowerUp()
    840 {
    841     /* Notify user about mouse&keyboard auto-capturing: */
    842     if (vboxGlobal().settings().autoCapture())
    843         vboxProblem().remindAboutAutoCapture();
    844 
    845     /* Shows first run wizard if necessary: */
    846     if (uisession()->isFirstTimeStarted())
    847     {
    848         UIFirstRunWzd wzd(defaultMachineWindow()->machineWindow(), session().GetMachine());
    849         wzd.exec();
    850     }
    851741}
    852742
     
    1023913{
    1024914    /* Do not try to enter extended mode if machine was not started yet: */
    1025     if (!m_fIsMachineStarted)
     915    if (!uisession()->isRunning() && !uisession()->isPaused())
    1026916        return;
    1027917
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r27300 r27310  
    8383#endif /* Q_WS_MAC */
    8484
    85 signals:
    86 
    87     void sigMachineStarted();
    88 
    8985protected:
    9086
     
    106102    void addMachineWindow(UIMachineWindow *pMachineWindow);
    107103    void retranslateUi();
    108     void tryToStartMachine();
    109104#ifdef Q_WS_MAC
    110105    bool isDockIconPreviewEnabled() const { return m_fIsDockIconEnabled; }
     
    114109
    115110    /* Prepare helpers: */
    116     virtual void prepareConnections();
    117     virtual void prepareConsoleConnections();
     111    virtual void prepareSessionConnections();
     112    virtual void prepareActionConnections();
    118113    virtual void prepareActionGroups();
    119     virtual void prepareActionConnections();
    120114#ifdef Q_WS_MAC
    121115    virtual void prepareDock();
    122116#endif /* Q_WS_MAC */
    123117    virtual void prepareRequiredFeatures();
    124     virtual void prepareConsolePowerUp();
    125118
    126119    /* Cleanup helpers: */
    127     //virtual void cleanupConsolePowerUp() {}
    128120    //virtual void cleanupRequiredFeatures() {}
    129121#ifdef Q_WS_MAC
    130122    //virtual void cleanupDock() {}
    131123#endif /* Q_WS_MAC */
     124    //virtual void cleanupActionGroups() {}
    132125    //virtual void cleanupActionConnections() {}
    133     //virtual void cleanupActionGroups() {}
    134     //virtual void cleanupConsoleConnections() {}
    135     //virtual void cleanupConnections() {}
     126    //virtual void cleanupSessionConnections() {}
    136127
    137128protected slots:
     
    205196
    206197    bool m_fIsWindowsCreated : 1;
    207     bool m_fIsMachineStarted : 1;
    208198    bool m_fIsPreventAutoStart : 1;
    209199    bool m_fIsPreventAutoClose : 1;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r27300 r27310  
    3434#include "UIMachineMenuBar.h"
    3535#include "VBoxProblemReporter.h"
     36#include "UIFirstRunWzd.h"
    3637
    3738#ifdef Q_WS_X11
     
    586587}
    587588
     589void UISession::powerUp()
     590{
     591    /* Do nothing if we had started already: */
     592    if (isRunning() || isPaused())
     593        return;
     594
     595    /* Prepare powerup: */
     596    preparePowerUp();
     597
     598    /* Get current machine/console: */
     599    CMachine machine = session().GetMachine();
     600    CConsole console = session().GetConsole();
     601
     602    /* Power UP machine: */
     603    CProgress progress = vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled() ?
     604                         console.PowerUpPaused() : console.PowerUp();
     605
     606#if 0 // TODO: Check immediate failure!
     607    /* Check for an immediate failure: */
     608    if (!console.isOk())
     609    {
     610        vboxProblem().cannotStartMachine(console);
     611        machineWindowWrapper()->machineWindow()->close();
     612        return;
     613    }
     614
     615    /* Disable auto-closure because we want to have a chance to show the error dialog on startup failure: */
     616    setPreventAutoClose(true);
     617#endif
     618
     619    /* Show "Starting/Restoring" progress dialog: */
     620    if (isSaved())
     621        vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow(), 0);
     622    else
     623        vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow());
     624
     625#if 0 // TODO: Check immediate failure!
     626    /* Check for an progress failure */
     627    if (progress.GetResultCode() != 0)
     628    {
     629        vboxProblem().cannotStartMachine(progress);
     630        machineWindowWrapper()->machineWindow()->close();
     631        return;
     632    }
     633
     634    /* Enable auto-closure again: */
     635    setPreventAutoClose(false);
     636
     637    /* Check if we missed a really quick termination after successful startup, and process it if we did: */
     638    if (uisession()->isTurnedOff())
     639    {
     640        machineWindowWrapper()->machineWindow()->close();
     641        return;
     642    }
     643#endif
     644
     645#if 0 // TODO: Rework debugger logic!
     646# ifdef VBOX_WITH_DEBUGGER_GUI
     647    /* Open the debugger in "full screen" mode requested by the user. */
     648    else if (vboxGlobal().isDebuggerAutoShowEnabled())
     649    {
     650        /* console in upper left corner of the desktop. */
     651        QRect rct (0, 0, 0, 0);
     652        QDesktopWidget *desktop = QApplication::desktop();
     653        if (desktop)
     654            rct = desktop->availableGeometry(pos());
     655        move (QPoint (rct.x(), rct.y()));
     656
     657        if (vboxGlobal().isDebuggerAutoShowStatisticsEnabled())
     658            sltShowDebugStatistics();
     659        if (vboxGlobal().isDebuggerAutoShowCommandLineEnabled())
     660            sltShowDebugCommandLine();
     661
     662        if (!vboxGlobal().isStartPausedEnabled())
     663            machineWindowWrapper()->machineView()->pause (false);
     664    }
     665# endif
     666#endif
     667
     668    /* Warn listeners about machine was started: */
     669    emit sigMachineStarted();
     670}
     671
    588672UIActionsPool* UISession::actionsPool() const
    589673{
    590674    return m_pMachine->actionsPool();
     675}
     676
     677QWidget* UISession::mainMachineWindow() const
     678{
     679    return uimachine()->machineLogic()->mainMachineWindow()->machineWindow();
    591680}
    592681
     
    9691058WId UISession::winId() const
    9701059{
    971     return uimachine()->machineLogic()->mainMachineWindow()->machineWindow()->winId();
     1060    return mainMachineWindow()->winId();
    9721061}
    9731062
     
    12511340}
    12521341
     1342void UISession::preparePowerUp()
     1343{
     1344#ifdef VBOX_WITH_UPDATE_REQUEST
     1345    /* Check for updates if necessary: */
     1346    vboxGlobal().showUpdateDialog(false /* force request? */);
     1347#endif
     1348
     1349    /* Notify user about mouse&keyboard auto-capturing: */
     1350    if (vboxGlobal().settings().autoCapture())
     1351        vboxProblem().remindAboutAutoCapture();
     1352
     1353    /* Shows first run wizard if necessary: */
     1354    if (isFirstTimeStarted())
     1355    {
     1356        UIFirstRunWzd wzd(mainMachineWindow(), session().GetMachine());
     1357        wzd.exec();
     1358    }
     1359}
     1360
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r27300 r27310  
    7676    virtual ~UISession();
    7777
     78    /* Common members: */
     79    void powerUp();
     80
    7881    /* Common getters: */
    7982    CSession& session() { return m_session; }
    8083    KMachineState machineState() const { return m_machineState; }
    8184    UIActionsPool* actionsPool() const;
     85    QWidget* mainMachineWindow() const;
    8286    QMenu* newMenu();
    8387    QMenuBar* newMenuBar();
     
    157161
    158162    /* Session signals: */
     163    void sigMachineStarted();
    159164    void sigMouseCapturedStatusChanged();
    160165
     
    184189    void setPointerShape(const uchar *pShapeData, bool fHasAlpha, uint uXHot, uint uYHot, uint uWidth, uint uHeight);
    185190    void reinitMenuPool();
     191    void preparePowerUp();
    186192
    187193    /* Private variables: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r27300 r27310  
    132132    if (!isPreventAutoStart())
    133133    {
     134#ifdef Q_WS_MAC
    134135        /* Prepare common connections: */
    135         prepareConnections();
     136        prepareCommonConnections();
     137#endif /* Q_WS_MAC */
    136138
    137139        /* Prepare console connections: */
    138         prepareConsoleConnections();
     140        prepareSessionConnections();
     141
     142        /* Prepare action connections: */
     143        prepareActionConnections();
    139144
    140145        /* Prepare action groups: */
    141146        prepareActionGroups();
    142147
    143         /* Prepare action connections: */
    144         prepareActionConnections();
    145 
    146148        /* Prepare machine window: */
    147149        prepareMachineWindows();
     
    151153        prepareDock();
    152154#endif /* Q_WS_MAC */
     155
     156        /* Power up machine: */
     157        uisession()->powerUp();
    153158
    154159        /* Initialization: */
     
    163168
    164169#ifdef Q_WS_MAC
    165 void UIMachineLogicFullscreen::prepareConsoleConnections()
    166 {
    167     /* Base class connections: */
    168     UIMachineLogic::prepareConsoleConnections();
    169 
     170void UIMachineLogicFullscreen::prepareCommonConnections()
     171{
    170172    /* Presentation mode connection */
    171173    connect (&vboxGlobal(), SIGNAL(presentationModeChanged(const VBoxChangePresentationModeEvent &)),
     
    212214    /* Remember what machine window(s) created: */
    213215    setMachineWindowsCreated(true);
    214 
    215     /* Check if we need to start VM: */
    216     tryToStartMachine();
    217216}
    218217
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h

    r27081 r27310  
    5656    /* Prepare helpers: */
    5757#ifdef Q_WS_MAC
    58     void prepareConsoleConnections();
     58    void prepareCommonConnections();
    5959#endif /* Q_WS_MAC */
    6060    void prepareActionGroups();
     
    6464    void cleanupMachineWindows();
    6565    void cleanupActionGroups();
     66#ifdef Q_WS_MAC
     67    //void cleanupCommonConnections() {}
     68#endif /* Q_WS_MAC */
    6669
    6770#ifdef Q_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r27300 r27310  
    5757    if (!isPreventAutoStart())
    5858    {
    59         /* Prepare common connections: */
    60         prepareConnections();
     59        /* Prepare session connections: */
     60        prepareSessionConnections();
    6161
    62         /* Prepare console connections: */
    63         prepareConsoleConnections();
     62        /* Prepare action connections: */
     63        prepareActionConnections();
    6464
    6565        /* Prepare action groups: */
    6666        prepareActionGroups();
    67 
    68         /* Prepare action connections: */
    69         prepareActionConnections();
    7067
    7168        /* Prepare normal machine window: */
     
    7673        prepareDock();
    7774#endif /* Q_WS_MAC */
     75
     76        /* Power up machine: */
     77        uisession()->powerUp();
    7878
    7979        /* Initialization: */
     
    148148    /* Remember what machine window(s) created: */
    149149    setMachineWindowsCreated(true);
    150 
    151     /* Check if we need to start VM: */
    152     tryToStartMachine();
    153150}
    154151
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h

    r26950 r27310  
    5959    /* Cleanup helpers: */
    6060    void cleanupMachineWindow();
    61     void cleanupActionConnections() {}
     61    //void cleanupActionConnections() {}
    6262
    6363    /* Friend classes: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp

    r27300 r27310  
    125125    if (!isPreventAutoStart())
    126126    {
    127         /* Prepare common connections: */
    128         prepareConnections();
    129 
    130127        /* Prepare console connections: */
    131         prepareConsoleConnections();
     128        prepareSessionConnections();
     129
     130        /* Prepare action connections: */
     131        prepareActionConnections();
    132132
    133133        /* Prepare action groups: */
    134134        prepareActionGroups();
    135 
    136         /* Prepare action connections: */
    137         prepareActionConnections();
    138135
    139136        /* Prepare normal machine window: */
     
    144141        prepareDock();
    145142#endif /* Q_WS_MAC */
     143
     144        /* Power up machine: */
     145        uisession()->powerUp();
    146146
    147147        /* Initialization: */
     
    198198    /* Remember what machine window(s) created: */
    199199    setMachineWindowsCreated(true);
    200 
    201     /* Check if we need to start VM: */
    202     tryToStartMachine();
    203200}
    204201
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette