VirtualBox

Changeset 90890 in vbox for trunk


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

FE/Qt: bugref:10067: Runtime UI: Move ACPI shutdown 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

    r90889 r90890  
    385385}
    386386#endif /* VBOX_WS_MAC */
    387 
    388 void UIMachineLogic::shutdown()
    389 {
    390     /* Warn the user about ACPI is not available if so: */
    391     if (!console().GetGuestEnteredACPIMode())
    392         return UINotificationMessage::cannotSendACPIToMachine();
    393 
    394     /* Shutdown: */
    395     uisession()->shutdown();
    396 }
    397387
    398388void UIMachineLogic::powerOff(bool fDiscardingState)
     
    18811871
    18821872    LogRel(("GUI: User requested to shutdown VM.\n"));
    1883     shutdown();
     1873    uisession()->shutdown();
    18841874}
    18851875
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r90889 r90890  
    143143#endif /* VBOX_WS_MAC */
    144144
    145     /** Call for guest shutdown to close Runtime UI. */
    146     void shutdown();
    147145    /** Power off VM, then close Runtime UI. */
    148146    void powerOff(bool fDiscardingState);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r90889 r90890  
    462462            /* Shutdown VM: */
    463463            LogRel(("GUI: Request for close-action to shutdown VM.\n"));
    464             machineLogic()->shutdown();
     464            uisession()->shutdown();
    465465            break;
    466466        }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r90889 r90890  
    356356}
    357357
    358 bool UISession::shutdown()
    359 {
     358void UISession::shutdown()
     359{
     360    /* Warn the user about ACPI is not available if so: */
     361    if (!console().GetGuestEnteredACPIMode())
     362        return UINotificationMessage::cannotSendACPIToMachine();
     363
    360364    /* Send ACPI shutdown signal if possible: */
     365    LogRel(("GUI: Sending ACPI shutdown signal..\n"));
    361366    console().PowerButton();
    362367    if (!console().isOk())
    363     {
    364         /* Failed in console: */
    365368        msgCenter().cannotACPIShutdownMachine(console());
    366         return false;
    367     }
    368     /* Passed: */
    369     return true;
    370369}
    371370
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r90889 r90890  
    8282    void saveState();
    8383    /** Calls for guest shutdown to close Runtime UI. */
    84     bool shutdown();
     84    void shutdown();
    8585    /** Powers VM down, then closes Runtime UI. */
    8686    bool powerOff(bool fIncludingDiscard, bool &fServerCrashed);
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