Changeset 57080 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 26, 2015 12:20:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r57076 r57080 3971 3971 initDebuggerVar(&m_fDbgAutoShow, "VBOX_GUI_DBG_AUTO_SHOW", GUI_Dbg_AutoShow, false); 3972 3972 m_fDbgAutoShowCommandLine = m_fDbgAutoShowStatistics = m_fDbgAutoShow; 3973 m StartPaused = false;3973 m_enmStartRunning = StartRunning_Default; 3974 3974 #endif 3975 3975 … … 4109 4109 setDebuggerVar(&m_fDbgAutoShowCommandLine, true); 4110 4110 setDebuggerVar(&m_fDbgAutoShowStatistics, true); 4111 mStartPaused = true;4112 4111 } 4113 4112 else if (!::strcmp(arg, "--debug-command-line")) … … 4116 4115 setDebuggerVar(&m_fDbgAutoShow, true); 4117 4116 setDebuggerVar(&m_fDbgAutoShowCommandLine, true); 4118 mStartPaused = true;4119 4117 } 4120 4118 else if (!::strcmp(arg, "--debug-statistics")) … … 4123 4121 setDebuggerVar(&m_fDbgAutoShow, true); 4124 4122 setDebuggerVar(&m_fDbgAutoShowStatistics, true); 4125 mStartPaused = true;4126 4123 } 4127 4124 else if (!::strcmp(arg, "-no-debug") || !::strcmp(arg, "--no-debug")) … … 4134 4131 /* Not quite debug options, but they're only useful with the debugger bits. */ 4135 4132 else if (!::strcmp(arg, "--start-paused")) 4136 m StartPaused = true;4133 m_enmStartRunning = StartRunning_No; 4137 4134 else if (!::strcmp(arg, "--start-running")) 4138 m StartPaused = false;4135 m_enmStartRunning = StartRunning_Yes; 4139 4136 #endif 4140 4137 /** @todo add an else { msgbox(syntax error); exit(1); } here, pretty please... */ … … 4206 4203 { 4207 4204 m_hVBoxDbg = NIL_RTLDRMOD; 4208 m_fDbgAutoShow = 4205 m_fDbgAutoShow = m_fDbgAutoShowCommandLine = m_fDbgAutoShowStatistics = false; 4209 4206 LogRel(("Failed to load VBoxDbg, rc=%Rrc - %s\n", vrc, ErrInfo.Core.pszMsg)); 4210 4207 } … … 4391 4388 || pStr->startsWith("f") // false 4392 4389 || pStr->startsWith("off") 4393 || pStr->contains("veto") 4390 || pStr->contains("veto") /* paranoia */ 4394 4391 || pStr->toLongLong() == 0) 4395 4392 *piDbgCfgVar = VBOXGLOBAL_DBG_CFG_VAR_FALSE; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r57045 r57080 81 81 }; 82 82 83 /** Whether to start the VM running. */ 84 enum StartRunning 85 { 86 StartRunning_Default, /**< Default (depends on debug settings). */ 87 StartRunning_No, /**< Start the VM paused. */ 88 StartRunning_Yes /**< Start the VM running. */ 89 }; 90 83 91 /* Static API: Create/destroy stuff: */ 84 92 static VBoxGlobal* instance(); … … 182 190 183 191 RTLDRMOD getDebuggerModule() const { return m_hVBoxDbg; } 184 185 bool isStartPausedEnabled() const { return mStartPaused; }186 192 #endif /* VBOX_WITH_DEBUGGER_GUI */ 193 194 bool shouldStartPaused() const 195 { 196 #ifdef VBOX_WITH_DEBUGGER_GUI 197 return m_enmStartRunning == StartRunning_Default ? isDebuggerAutoShowEnabled() : m_enmStartRunning == StartRunning_No; 198 #else 199 return false; 200 #endif 201 } 187 202 188 203 /* VBox enum to/from string/icon/color convertors */ … … 531 546 RTLDRMOD m_hVBoxDbg; 532 547 533 /** Whether to start the VM in paused state or not. */534 bool mStartPaused;548 /** Whether --start-running, --start-paused or nothing was given. */ 549 enum StartRunning m_enmStartRunning; 535 550 #endif 536 551 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r56730 r57080 856 856 /* HACK ALERT! Really ugly workaround for the resizing to 9x1 done by DevVGA if provoked before power on. */ 857 857 if (size.width() < 16 || size.height() < 16) 858 if (vboxGlobal(). isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled())858 if (vboxGlobal().shouldStartPaused() || vboxGlobal().isDebuggerAutoShowEnabled()) 859 859 size = QSize(640, 480); 860 860 #endif /* !VBOX_WITH_DEBUGGER_GUI */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r56704 r57080 258 258 { 259 259 /* Power UP machine: */ 260 #ifdef VBOX_WITH_DEBUGGER_GUI 261 CProgress progress = vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled() ? 262 console().PowerUpPaused() : console().PowerUp(); 263 #else /* !VBOX_WITH_DEBUGGER_GUI */ 264 CProgress progress = console().PowerUp(); 265 #endif /* !VBOX_WITH_DEBUGGER_GUI */ 260 CProgress progress = vboxGlobal().shouldStartPaused() ? console().PowerUpPaused() : console().PowerUp(); 266 261 267 262 /* Check for immediate failure: */
Note:
See TracChangeset
for help on using the changeset viewer.