VirtualBox

Changeset 90889 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 25, 2021 4:40:01 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: Runtime UI: Move detach UI stuff to the place where it belongs (UISession).

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

Legend:

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

    r90888 r90889  
    385385}
    386386#endif /* VBOX_WS_MAC */
    387 
    388 void UIMachineLogic::detach()
    389 {
    390     /* Enable 'manual-override',
    391      * preventing automatic Runtime UI closing: */
    392     uisession()->setManualOverrideMode(true);
    393 
    394     /* Was the step successful? */
    395     bool fSuccess = true;
    396     LogRel(("GUI: Passing request to detach UI from machine-logic to UI session.\n"));
    397     fSuccess = uisession()->detach();
    398 
    399     /* Manually close Runtime UI: */
    400     if (fSuccess)
    401         uisession()->closeRuntimeUI();
    402 }
    403387
    404388void UIMachineLogic::shutdown()
     
    18711855
    18721856    LogRel(("GUI: User requested to detach GUI.\n"));
    1873     detach();
     1857    uisession()->detachUi();
    18741858}
    18751859
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r90888 r90889  
    143143#endif /* VBOX_WS_MAC */
    144144
    145     /** Detach and close Runtime UI. */
    146     void detach();
    147145    /** Call for guest shutdown to close Runtime UI. */
    148146    void shutdown();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r90888 r90889  
    448448            /* Detach GUI: */
    449449            LogRel(("GUI: Request for close-action to detach GUI.\n"));
    450             machineLogic()->detach();
     450            uisession()->detachUi();
    451451            break;
    452452        }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r90888 r90889  
    320320}
    321321
    322 bool UISession::detach()
    323 {
    324     /* Nothing here for now: */
    325     return true;
     322void UISession::detachUi()
     323{
     324    /* Enable 'manual-override',
     325     * preventing automatic Runtime UI closing: */
     326    setManualOverrideMode(true);
     327
     328    /* Manually close Runtime UI: */
     329    LogRel(("GUI: Detaching UI..\n"));
     330    closeRuntimeUI();
    326331}
    327332
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r90888 r90889  
    7878    bool powerUp();
    7979    /** Detaches and closes Runtime UI. */
    80     bool detach();
     80    void detachUi();
    8181    /** Saves VM state, then closes Runtime UI. */
    8282    void saveState();
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