Changeset 98607 in vbox
- Timestamp:
- Feb 16, 2023 4:02:34 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155899
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98605 r98607 646 646 } 647 647 #endif /* VBOX_WITH_DEBUGGER_GUI */ 648 649 bool UIMachine::acquireWhetherGuestEnteredACPIMode(bool &fEntered) 650 { 651 return uisession()->acquireWhetherGuestEnteredACPIMode(fEntered); 652 } 648 653 649 654 void UIMachine::detachUi() -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98605 r98607 490 490 MachineCloseAction restrictedCloseActions() const { return m_restrictedCloseActions; } 491 491 492 /** Acquires whether guest @a fEntered ACPI mode. */ 493 bool acquireWhetherGuestEnteredACPIMode(bool &fEntered); 494 492 495 /** Detaches and closes Runtime UI. */ 493 496 void detachUi(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r98605 r98607 54 54 55 55 /* COM includes: */ 56 #include "CConsole.h"57 56 #include "CGraphicsAdapter.h" 58 57 #include "CSnapshot.h" … … 227 226 } 228 227 229 CConsole& UIMachineWindow::console() const230 {231 return uisession()->console();232 }233 234 228 QString UIMachineWindow::machineName() const 235 229 { … … 430 424 /* Prepare close-dialog: */ 431 425 QWidget *pParentDlg = windowManager().realParentWindow(this); 426 bool fInACPIMode = false; 427 uimachine()->acquireWhetherGuestEnteredACPIMode(fInACPIMode); 432 428 QPointer<UIVMCloseDialog> pCloseDlg = new UIVMCloseDialog(pParentDlg, machine(), 433 console().GetGuestEnteredACPIMode(),429 fInACPIMode, 434 430 restrictedCloseActions); 435 431 /* Configure close-dialog: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r98517 r98607 96 96 /** Returns the session's machine reference. */ 97 97 CMachine& machine() const; 98 /** Returns the session's console reference. */99 CConsole& console() const;100 98 101 99 /** Returns the machine name. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98605 r98607 792 792 #endif /* VBOX_WITH_DEBUGGER_GUI */ 793 793 794 bool UISession::acquireWhetherGuestEnteredACPIMode(bool &fEntered) 795 { 796 CConsole comConsole = console(); 797 const BOOL fGuestEntered = comConsole.GetGuestEnteredACPIMode(); 798 const bool fSuccess = comConsole.isOk(); 799 if (!fSuccess) 800 UINotificationMessage::cannotAcquireConsoleParameter(comConsole); 801 else 802 fEntered = fGuestEntered == TRUE; 803 return fSuccess; 804 } 805 794 806 bool UISession::prepareToBeSaved() 795 807 { … … 800 812 bool UISession::prepareToBeShutdowned() 801 813 { 802 const bool fValidMode = console().GetGuestEnteredACPIMode(); 814 bool fValidMode = false; 815 acquireWhetherGuestEnteredACPIMode(fValidMode); 803 816 if (!fValidMode) 804 817 UINotificationMessage::cannotSendACPIToMachine(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98605 r98607 392 392 /** @name Close stuff. 393 393 ** @{ */ 394 /** Acquires whether guest @a fEntered ACPI mode. */ 395 bool acquireWhetherGuestEnteredACPIMode(bool &fEntered); 396 394 397 /** Prepares VM to be saved. */ 395 398 bool prepareToBeSaved();
Note:
See TracChangeset
for help on using the changeset viewer.