VirtualBox

Changeset 98952 in vbox


Ignore:
Timestamp:
Mar 14, 2023 11:27:12 AM (19 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: Reattach machine-logic init from session to machine trigger.

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

Legend:

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

    r98875 r98952  
    249249}
    250250
    251 void UIMachineLogic::initializePostPowerUp()
    252 {
    253 #ifdef VBOX_WITH_DEBUGGER_GUI
    254     prepareDebugger();
    255 #endif /* VBOX_WITH_DEBUGGER_GUI */
    256     sltMachineStateChanged();
    257     sltAdditionsStateChanged();
    258     sltMouseCapabilityChanged();
    259 }
    260 
    261251UIActionPool *UIMachineLogic::actionPool() const
    262252{
     
    361351    LogRel(("GUI: Request to power VM off due to VBoxSVC is unavailable.\n"));
    362352    uimachine()->powerOff(false /* do NOT restore current snapshot */);
     353}
     354
     355void UIMachineLogic::sltHandleMachineInitialized()
     356{
     357#ifdef VBOX_WITH_DEBUGGER_GUI
     358    prepareDebugger();
     359#endif
     360    sltMachineStateChanged();
     361    sltAdditionsStateChanged();
     362    sltMouseCapabilityChanged();
    363363}
    364364
     
    857857            this, &UIMachineLogic::sltHandleVBoxSVCAvailabilityChange);
    858858
     859    /* We should watch for machine UI initialization signal: */
     860    connect(uimachine(), &UIMachine::sigInitialized, this, &UIMachineLogic::sltHandleMachineInitialized);
     861
    859862    /* We should watch for requested modes: */
    860863    connect(uimachine(), &UIMachine::sigInitialized, this, &UIMachineLogic::sltCheckForRequestedVisualStateType, Qt::QueuedConnection);
     
    14051408               this, &UIMachineLogic::sltHandleVBoxSVCAvailabilityChange);
    14061409
     1410    /* We should stop watching for machine UI initialization signal: */
     1411    disconnect(uimachine(), &UIMachine::sigInitialized, this, &UIMachineLogic::sltHandleMachineInitialized);
     1412
    14071413    /* We should stop watching for requested modes: */
    14081414    disconnect(uimachine(), &UIMachine::sigInitialized, this, &UIMachineLogic::sltCheckForRequestedVisualStateType);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r98855 r98952  
    8787    virtual void cleanup();
    8888
    89     void initializePostPowerUp();
    90 
    9189    /** Returns machine UI reference.  */
    9290    UIMachine *uimachine() const { return m_pMachine; }
     
    125123    /** Handles the VBoxSVC availability change. */
    126124    void sltHandleVBoxSVCAvailabilityChange();
     125
     126    /** Handles Machine UI initialized event. */
     127    void sltHandleMachineInitialized();
    127128
    128129    /** Checks if some visual-state type was requested. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r98944 r98952  
    194194    /* Fetch corresponding states: */
    195195    if (uiCommon().isSeparateProcess())
    196     {
    197196        sltAdditionsChange();
    198     }
    199     machineLogic()->initializePostPowerUp();
    200197
    201198#ifdef VBOX_GUI_WITH_PIDFILE
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r98885 r98952  
    137137}
    138138
    139 void UIMachineWindowNormal::sltHandleSessionInitialized()
     139void UIMachineWindowNormal::sltHandleMachineInitialized()
    140140{
    141141    /* Update virtualization stuff: */
     
    272272            this, &UIMachineWindowNormal::sltCPUExecutionCapChange);
    273273
    274     /* Watch for UIMachine signals: */
     274    /* Watch for machine UI signals: */
    275275    connect(machineLogic()->uimachine(), &UIMachine::sigInitialized,
    276             this, &UIMachineWindowNormal::sltHandleSessionInitialized);
     276            this, &UIMachineWindowNormal::sltHandleMachineInitialized);
    277277}
    278278
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h

    r98103 r98952  
    7575    /** Handles CPU execution cap change event. */
    7676    void sltCPUExecutionCapChange();
    77     /** Handles UISession initialized event. */
    78     void sltHandleSessionInitialized();
     77    /** Handles Machine UI initialized event. */
     78    void sltHandleMachineInitialized();
    7979
    8080#ifndef RT_OS_DARWIN
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