Changeset 98940 in vbox
- Timestamp:
- Mar 13, 2023 4:00:39 PM (19 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
-
UIMachine.cpp (modified) (1 diff)
-
UIMachine.h (modified) (1 diff)
-
UIMachineWindow.cpp (modified) (1 diff)
-
UISession.cpp (modified) (2 diffs)
-
UISession.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98938 r98940 212 212 ? machineLogic()->activeMachineWindow() 213 213 : 0; 214 } 215 216 bool UIMachine::isSessionValid() const 217 { 218 return uisession() ? uisession()->isValid() : false; 214 219 } 215 220 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98926 r98940 174 174 /** Returns active machine-window reference (if possible). */ 175 175 QWidget *activeWindow() const; 176 177 /** Returns whether session UI is valid. */ 178 bool isSessionValid() const; 176 179 177 180 /** Returns whether requested visual @a state allowed. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r98849 r98940 355 355 void UIMachineWindow::closeEvent(QCloseEvent *pCloseEvent) 356 356 { 357 /* Fast handling in case if session is invalid: */ 358 if (!uimachine()->isSessionValid()) 359 { 360 uimachine()->closeRuntimeUI(); 361 return; 362 } 363 357 364 /* Always ignore close-event first: */ 358 365 pCloseEvent->ignore(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98939 r98940 109 109 /* Base variables: */ 110 110 , m_pMachine(pMachine) 111 , m_fValid(false) 111 112 , m_pConsoleEventhandler(0) 112 113 /* Common variables: */ … … 201 202 uiCommon().createPidfile(); 202 203 #endif /* VBOX_GUI_WITH_PIDFILE */ 204 205 /* Mark as valid finally: */ 206 m_fValid = true; 203 207 204 208 /* True by default: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98938 r98940 156 156 /** Performs session UI intialization. */ 157 157 bool initialize(); 158 159 /** Returns whether session UI is valid. */ 160 bool isValid() const { return m_fValid; } 161 158 162 /** Powers VM up. */ 159 163 bool powerUp(); … … 703 707 UIMachine *m_pMachine; 704 708 709 /** Holds whether session UI is valid. */ 710 bool m_fValid; 711 705 712 /** Holds the machine name. */ 706 713 QString m_strMachineName;
Note:
See TracChangeset
for help on using the changeset viewer.

