Changeset 71360 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 15, 2018 5:14:12 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r71348 r71360 353 353 src/globals/UIPopupCenter.h \ 354 354 src/globals/UIShortcutPool.h \ 355 src/globals/UIStarter.h \ 355 356 src/globals/UIThreadPool.h \ 356 357 src/globals/VBoxGlobal.h \ … … 695 696 src/globals/UIPopupCenter.cpp \ 696 697 src/globals/UIShortcutPool.cpp \ 698 src/globals/UIStarter.cpp \ 697 699 src/globals/UIThreadPool.cpp \ 698 700 src/globals/VBoxGlobal.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r71355 r71360 53 53 /* GUI includes: */ 54 54 # include "VBoxGlobal.h" 55 # include "UISelectorWindow.h"56 55 # include "UIMessageCenter.h" 57 56 # include "UIPopupCenter.h" … … 3634 3633 if (!list.isEmpty()) 3635 3634 { 3635 /* Store the URLs: */ 3636 3636 m_ArgUrlList = list; 3637 UISelectorWindow::create();3638 QTimer::singleShot(0, gpSelectorWindow, SLOT(sltOpenUrls()));3637 /* Ask UIStarter to open them: */ 3638 emit sigAskToOpenURLs(); 3639 3639 } 3640 3640 return fResult; … … 4061 4061 #endif /* VBOX_GUI_WITH_PIDFILE */ 4062 4062 4063 /* Destroy the GUI root windows _BEFORE_4064 * the media related code which could race us: */4065 if (gpSelectorWindow)4066 UISelectorWindow::destroy();4067 if (gpMachine)4068 UIMachine::destroy();4069 4070 4063 /* Starting medium-enumerator cleanup: */ 4071 4064 m_mediumEnumeratorDtorRwLock.lockForWrite(); … … 4220 4213 UIExtraDataManager::instance(); 4221 4214 UIVirtualBoxEventHandler::instance(); 4222 /* Recreate/show selector-window: */ 4223 UISelectorWindow::destroy(); 4224 UISelectorWindow::create(); 4215 /* Ask UIStarter to restart UI: */ 4216 emit sigAskToRestartUI(); 4225 4217 } 4226 4218 } … … 4381 4373 4382 4374 #endif /* VBOX_WITH_DEBUGGER_GUI */ 4383 4384 void VBoxGlobal::showUI()4385 {4386 /* Show Selector UI: */4387 if (!isVMConsoleProcess())4388 {4389 /* Make sure Selector UI is permitted, quit if not: */4390 if (gEDataManager->guiFeatureEnabled(GUIFeatureType_NoSelector))4391 {4392 msgCenter().cannotStartSelector();4393 return QApplication::quit();4394 }4395 4396 /* Create/show selector-window: */4397 UISelectorWindow::create();4398 4399 #ifdef VBOX_BLEEDING_EDGE4400 /* Show EXPERIMENTAL BUILD warning: */4401 msgCenter().showExperimentalBuildWarning();4402 #else /* !VBOX_BLEEDING_EDGE */4403 # ifndef DEBUG4404 /* Show BETA warning if necessary: */4405 const QString vboxVersion(vboxGlobal().virtualBox().GetVersion());4406 if ( vboxVersion.contains("BETA")4407 && gEDataManager->preventBetaBuildWarningForVersion() != vboxVersion)4408 msgCenter().showBetaBuildWarning();4409 # endif /* !DEBUG */4410 #endif /* !VBOX_BLEEDING_EDGE */4411 }4412 /* Show Runtime UI: */4413 else4414 {4415 /* Make sure machine is started, quit if not: */4416 if (!UIMachine::startMachine(vboxGlobal().managedVMUuid()))4417 return QApplication::quit();4418 }4419 }4420 4375 4421 4376 bool VBoxGlobal::switchToMachine(CMachine &machine) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r71355 r71360 448 448 signals: 449 449 450 /** Asks listener to recreate UI. */ 451 void sigAskToRestartUI(); 452 /** Ask listener to open URLs. */ 453 void sigAskToOpenURLs(); 454 450 455 /** Notifies listeners about the VBoxSVC availability change. */ 451 456 void sigVBoxSVCAvailabilityChange(); … … 474 479 /** Handles @a manager request for emergency session shutdown. */ 475 480 void sltHandleCommitDataRequest(QSessionManager &manager); 476 477 /** Shows UI. */478 void showUI();479 481 480 482 /** Handles the VBoxSVC availability change. */ -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r71355 r71360 26 26 /* GUI includes: */ 27 27 # include "VBoxGlobal.h" 28 # include "UIMachine.h" 29 # include "UISelectorWindow.h" 28 # include "UIStarter.h" 30 29 # include "UIModalWindowManager.h" 31 30 # ifdef VBOX_WS_MAC … … 462 461 UIModalWindowManager::create(); 463 462 464 /* Create global UI instance: */ 463 /* Create UI starter: */ 464 UIStarter::create(); 465 /* Create global app instance: */ 465 466 VBoxGlobal::create(); 466 467 … … 471 472 if (!vboxGlobal().isValid()) 472 473 break; 474 475 /* Init link between UI starter and global app instance: */ 476 gStarter->init(); 473 477 474 478 /* Exit if VBoxGlobal pre-processed arguments: */ … … 483 487 } 484 488 485 /* Request to Show UI _after_ QApplication started: */486 QMetaObject::invokeMethod( &vboxGlobal(), "showUI", Qt::QueuedConnection);489 /* Request to Show UI _after_ QApplication executed: */ 490 QMetaObject::invokeMethod(gStarter, "sltShowUI", Qt::QueuedConnection); 487 491 488 492 /* Start application: */ 489 493 iResultCode = a.exec(); 494 495 /* Break link between UI starter and global app instance: */ 496 gStarter->deinit(); 490 497 } 491 498 while (0); 492 499 493 /* Destroy global UIinstance: */500 /* Destroy global app instance: */ 494 501 VBoxGlobal::destroy(); 502 /* Destroy UI starter: */ 503 UIStarter::destroy(); 495 504 496 505 /* Destroy modal-window manager: */
Note:
See TracChangeset
for help on using the changeset viewer.