Changeset 52987 in vbox
- Timestamp:
- Oct 8, 2014 10:58:38 AM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
-
UIMachine.cpp (modified) (2 diffs)
-
UIMachine.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r52977 r52987 213 213 machineLogic()->initializePostPowerUp(); 214 214 215 /* True by default: */ 215 216 return true; 216 217 } … … 242 243 QWidget* UIMachine::activeWindow() const 243 244 { 244 /* Null if machine-logic not yet created: */ 245 if (!machineLogic()) 246 return 0; 247 /* Active machine-window otherwise: */ 248 return machineLogic()->activeMachineWindow(); 245 if (machineLogic() && machineLogic()->activeMachineWindow()) 246 return machineLogic()->activeMachineWindow(); 247 return 0; 249 248 } 250 249 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r52977 r52987 35 35 class UIMachineLogic; 36 36 37 /** Singleton QObject extension 38 * used as virtual machine (VM) singleton instance. */ 37 39 class UIMachine : public QObject 38 40 { … … 53 55 UIMachine(); 54 56 /** Destructor. */ 55 virtual~UIMachine();57 ~UIMachine(); 56 58 57 /* Public getters:*/59 /** Returns active machine-window reference (if possible). */ 58 60 QWidget* activeWindow() const; 61 /** Returns UI session instance. */ 59 62 UISession *uisession() const { return m_pSession; } 60 63 … … 67 70 private slots: 68 71 69 /* Visual state-change handler:*/72 /** Visual state-change handler. */ 70 73 void sltChangeVisualState(UIVisualStateType visualStateType); 71 74 72 75 private: 73 76 77 /** Prepare routine. */ 74 78 bool prepare(); 75 79 76 /* Move VM to default (normal) state:*/80 /** Moves VM to default (normal) state. */ 77 81 void enterInitialVisualState(); 78 82 79 /* Private getters:*/83 /** Returns machine-logic reference (if possible). */ 80 84 UIMachineLogic* machineLogic() const; 81 85 82 /* Prepare helpers:*/86 /** Prepare routine: Loading stuff. */ 83 87 void loadMachineSettings(); 84 88 85 /* Cleanup helpers:*/89 /** Prepare routine: Saving stuff. */ 86 90 void saveMachineSettings(); 87 91 … … 98 102 99 103 #endif /* !___UIMachine_h___ */ 100
Note:
See TracChangeset
for help on using the changeset viewer.

