- Timestamp:
- Feb 28, 2010 5:43:39 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r26889 r26893 26 26 #include <QFileInfo> 27 27 #include <QDesktopWidget> 28 #include <QTimer> 28 29 29 30 /* Local includes */ … … 373 374 , m_pRunningActions(0) 374 375 , m_pRunningOrPausedActions(0) 376 , m_fIsPreventAutoStart(false) 375 377 , m_fIsPreventAutoClose(false) 376 378 { … … 540 542 CConsole console = session().GetConsole(); 541 543 542 /* Check if the virtualization feature is required. */ 543 bool fIs64BitsGuest = vboxGlobal().virtualBox().GetGuestOSType(console.GetGuest().GetOSTypeId()).GetIs64Bit(); 544 bool fRecommendVirtEx = vboxGlobal().virtualBox().GetGuestOSType(console.GetGuest().GetOSTypeId()).GetRecommendedVirtEx(); 545 AssertMsg(!fIs64BitsGuest || fRecommendVirtEx, ("Virtualization support missed for 64bit guest!\n")); 546 bool fIsVirtEnabled = console.GetDebugger().GetHWVirtExEnabled(); 547 if (fRecommendVirtEx && !fIsVirtEnabled) 548 { 549 bool fResult; 550 551 uisession()->pause(); 552 553 bool fVTxAMDVSupported = vboxGlobal().virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx); 554 555 if (fIs64BitsGuest) 556 fResult = vboxProblem().warnAboutVirtNotEnabled64BitsGuest(fVTxAMDVSupported); 557 else 558 fResult = vboxProblem().warnAboutVirtNotEnabledGuestRequired(fVTxAMDVSupported); 559 560 if (fResult == true) 561 sltClose(); 562 else 563 uisession()->unpause(); 544 /* Check if the required virtualization features are ready: */ 545 if (!isPreventAutoStart()) 546 { 547 bool fIs64BitsGuest = vboxGlobal().virtualBox().GetGuestOSType(console.GetGuest().GetOSTypeId()).GetIs64Bit(); 548 bool fRecommendVirtEx = vboxGlobal().virtualBox().GetGuestOSType(console.GetGuest().GetOSTypeId()).GetRecommendedVirtEx(); 549 AssertMsg(!fIs64BitsGuest || fRecommendVirtEx, ("Virtualization support missed for 64bit guest!\n")); 550 bool fIsVirtEnabled = console.GetDebugger().GetHWVirtExEnabled(); 551 if (fRecommendVirtEx && !fIsVirtEnabled) 552 { 553 bool fShouldWeClose; 554 555 bool fVTxAMDVSupported = vboxGlobal().virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx); 556 557 if (fIs64BitsGuest) 558 fShouldWeClose = vboxProblem().warnAboutVirtNotEnabled64BitsGuest(fVTxAMDVSupported); 559 else 560 fShouldWeClose = vboxProblem().warnAboutVirtNotEnabledGuestRequired(fVTxAMDVSupported); 561 562 if (fShouldWeClose == true) 563 setPreventAutoStart(true); 564 } 564 565 } 565 566 566 567 #ifdef Q_WS_MAC 567 568 # ifdef VBOX_WITH_ICHAT_THEATER 568 initSharedAVManager(); 569 /* Init shared AV manager: */ 570 if (!isPreventAutoStart()) 571 initSharedAVManager(); 569 572 # endif 570 573 #endif 574 575 /* Close request in case of features are not ready and user wish to close: */ 576 if (isPreventAutoStart()) 577 QTimer::singleShot(0, uisession(), SLOT(sltCloseVirtualSession())); 571 578 } 572 579 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r26815 r26893 65 65 66 66 /* Maintenance getters/setters: */ 67 bool isPreventAutoStart() const { return m_fIsPreventAutoStart; } 67 68 bool isPreventAutoClose() const { return m_fIsPreventAutoClose; } 69 void setPreventAutoStart(bool fIsPreventAutoStart) { m_fIsPreventAutoStart = fIsPreventAutoStart; } 68 70 void setPreventAutoClose(bool fIsPreventAutoClose) { m_fIsPreventAutoClose = fIsPreventAutoClose; } 69 71 … … 155 157 QActionGroup *m_pRunningOrPausedActions; 156 158 159 bool m_fIsPreventAutoStart : 1; 157 160 bool m_fIsPreventAutoClose : 1; 158 161 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r26815 r26893 44 44 : UIMachineLogic(pParent, pSession, pActionsPool, UIVisualStateType_Normal) 45 45 { 46 /* Prepare console connections: */47 prepareConsoleConnections();48 49 /* Prepare action groups: */50 prepareActionGroups();51 52 /* Prepare action connections: */53 prepareActionConnections();54 55 46 /* Check the status of required features: */ 56 47 prepareRequiredFeatures(); 57 48 58 /* Prepare normal machine window: */ 59 prepareMachineWindow(); 60 61 /* Initialization: */ 62 sltMachineStateChanged(); 63 sltAdditionsStateChanged(); 64 sltMouseCapabilityChanged(); 49 /* If required features are ready: */ 50 if (!isPreventAutoStart()) 51 { 52 /* Prepare console connections: */ 53 prepareConsoleConnections(); 54 55 /* Prepare action groups: */ 56 prepareActionGroups(); 57 58 /* Prepare action connections: */ 59 prepareActionConnections(); 60 61 /* Prepare normal machine window: */ 62 prepareMachineWindow(); 63 64 /* Initialization: */ 65 sltMachineStateChanged(); 66 sltAdditionsStateChanged(); 67 sltMouseCapabilityChanged(); 68 } 65 69 } 66 70
Note:
See TracChangeset
for help on using the changeset viewer.