- Timestamp:
- May 30, 2018 9:18:18 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 122849
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r72174 r72389 188 188 189 189 /* static */ 190 #ifndef VBOX_GUI_WITH_SHARED_LIBRARY 190 191 void VBoxGlobal::create() 192 #else 193 void VBoxGlobal::create(UIType enmType) 194 #endif 191 195 { 192 196 /* Make sure instance is NOT created yet: */ … … 197 201 } 198 202 203 #ifndef VBOX_GUI_WITH_SHARED_LIBRARY 199 204 /* Create instance: */ 200 205 new VBoxGlobal; 206 #else 207 /* Create instance: */ 208 new VBoxGlobal(enmType); 209 #endif 201 210 /* Prepare instance: */ 202 211 s_pInstance->prepare(); … … 223 232 } 224 233 234 #ifndef VBOX_GUI_WITH_SHARED_LIBRARY 225 235 VBoxGlobal::VBoxGlobal() 226 : mValid (false) 236 : mValid(false) 237 #else 238 VBoxGlobal::VBoxGlobal(UIType enmType) 239 : m_enmType(enmType) 240 , mValid(false) 241 #endif 227 242 #ifdef VBOX_WS_MAC 228 243 , m_osRelease(MacOSXRelease_Old) … … 4017 4032 } 4018 4033 4034 #ifndef VBOX_GUI_WITH_SHARED_LIBRARY 4019 4035 if (startVM) 4036 #else 4037 if (m_enmType == UIType_RuntimeUI && startVM) 4038 #endif 4020 4039 { 4021 4040 /* m_fSeparateProcess makes sense only if a VM is started. */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r71784 r72389 65 65 public: 66 66 67 #ifdef VBOX_GUI_WITH_SHARED_LIBRARY 68 /** UI types. */ 69 enum UIType 70 { 71 UIType_SelectorUI, 72 UIType_RuntimeUI 73 }; 74 #endif 75 67 76 /** VM launch modes. */ 68 77 enum LaunchMode … … 84 93 /* Static API: Create/destroy stuff: */ 85 94 static VBoxGlobal *instance() { return s_pInstance; } 95 #ifndef VBOX_GUI_WITH_SHARED_LIBRARY 86 96 static void create(); 97 #else 98 static void create(UIType enmType); 99 #endif 87 100 static void destroy(); 88 101 … … 501 514 private: 502 515 503 /* Constructor/destructor: */ 516 #ifndef VBOX_GUI_WITH_SHARED_LIBRARY 517 /** Construcs global VirtualBox object. */ 504 518 VBoxGlobal(); 505 ~VBoxGlobal(); 519 #else 520 /** Construcs global VirtualBox object of passed @a enmType. */ 521 VBoxGlobal(UIType enmType); 522 #endif 523 524 /** Destrucs global VirtualBox object. */ 525 virtual ~VBoxGlobal() /* override */; 506 526 507 527 /** Re-initializes COM wrappers and containers. */ … … 517 537 void setDebuggerVar(int *piDbgCfgVar, bool fState); 518 538 bool isDebuggerWorker(int *piDbgCfgVar, const char *pszExtraDataName) const; 539 #endif 540 541 #ifdef VBOX_GUI_WITH_SHARED_LIBRARY 542 /** Holds the UI type. */ 543 UIType m_enmType; 519 544 #endif 520 545 -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r72363 r72389 464 464 /* Create UI starter: */ 465 465 UIStarter::create(); 466 #ifndef VBOX_GUI_WITH_SHARED_LIBRARY 466 467 /* Create global app instance: */ 467 468 VBoxGlobal::create(); 469 #else 470 # ifndef VBOX_RUNTIME_UI 471 /* Create global app instance for Selecotr UI: */ 472 VBoxGlobal::create(VBoxGlobal::UIType_SelectorUI); 473 # else 474 /* Create global app instance for Runtime UI: */ 475 VBoxGlobal::create(VBoxGlobal::UIType_RuntimeUI); 476 # endif 477 #endif 468 478 469 479 /* Simulate try-catch block: */
Note:
See TracChangeset
for help on using the changeset viewer.