- Timestamp:
- Feb 9, 2009 2:16:19 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r16472 r16589 184 184 bool toggleFullscreenMode (bool, bool); 185 185 186 void checkRequiredFeatures(); 187 186 188 private slots: 187 189 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r16264 r16589 233 233 234 234 void cannotSendACPIToMachine(); 235 bool warnAboutVirtNotEnabled(); 235 236 236 237 void cannotSetSnapshotFolder (const CMachine &aMachine, const QString &aPath); -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsGeneral.h
r16101 r16589 46 46 void putBackTo(); 47 47 48 void setValidator (QIWidgetValidator *aVal); 48 49 bool revalidate (QString &aWarning, QString &aTitle); 49 50 … … 75 76 76 77 CMachine mMachine; 78 QIWidgetValidator *mValidator; 77 79 }; 78 80 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r16544 r16589 1094 1094 #endif 1095 1095 1096 /* Finally check the status of required features. */ 1097 checkRequiredFeatures(); 1098 1096 1099 /* Re-request all the static values finally after 1097 1100 * view is really opened and attached. */ … … 2139 2142 2140 2143 /** 2144 * This function checks the status of required features and 2145 * makes a warning and/or some action if something necessary 2146 * is not in good condition. 2147 * Does nothing if no console view was opened. 2148 */ 2149 void VBoxConsoleWnd::checkRequiredFeatures() 2150 { 2151 if (!console) return; 2152 2153 CConsole cconsole = console->console(); 2154 2155 /* Check if virtualization feature enabled for 64 bits guest */ 2156 bool is64BitsGuest = vboxGlobal().virtualBox().GetGuestOSType ( 2157 cconsole.GetGuest().GetOSTypeId()).GetIs64Bit(); 2158 bool isVirtEnabled = cconsole.GetDebugger().GetHWVirtExEnabled(); 2159 if (is64BitsGuest && !isVirtEnabled) 2160 { 2161 vmPause (true); 2162 vboxProblem().warnAboutVirtNotEnabled() ? close() : vmPause (false); 2163 } 2164 } 2165 2166 /** 2141 2167 * @return @c true if successfully performed the requested operation and false 2142 2168 * otherwise. -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r16273 r16589 930 930 } 931 931 932 bool VBoxProblemReporter::warnAboutVirtNotEnabled() 933 { 934 return messageOkCancel (mainWindowShown(), Error, 935 tr ("<p>VT-x/AMD-V hardware acceleration has been enabled, but is " 936 "not operational. Your 64 bits guest will fail to detect a 64 " 937 "bits CPU and will not be able to boot.</p><p>Please check if you " 938 "have enabled VT-x/AMD-V properly in the BIOS of your host " 939 "computer.</p>"), 940 0 /* aAutoConfirmId */, 941 tr ("Close VM"), tr ("Continue")); 942 } 943 932 944 void VBoxProblemReporter::cannotSetSnapshotFolder (const CMachine &aMachine, 933 945 const QString &aPath) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp
r16101 r16589 24 24 #include "VBoxGlobal.h" 25 25 #include "VBoxProblemReporter.h" 26 #include "QIWidgetValidator.h" 26 27 #include <iprt/asm.h> 27 28 #include <VBox/x86.h> … … 52 53 53 54 VBoxVMSettingsGeneral::VBoxVMSettingsGeneral() 55 : mValidator (0) 54 56 { 55 57 /* Apply UI decorations */ … … 240 242 QString saveRtimeImages = mMachine.GetExtraData (VBoxDefs::GUI_SaveMountedAtRuntime); 241 243 mCbSaveMounted->setChecked (saveRtimeImages != "no"); 244 245 if (mValidator) 246 mValidator->revalidate(); 242 247 } 243 248 244 249 void VBoxVMSettingsGeneral::putBackTo() 245 250 { 251 /* Make auto-attenuation for some settings in this chapter: */ 252 253 /* Enable VT-x/AMD-V feature if the guest is of 64 bits */ 254 if (mOSTypeSelector->type().GetIs64Bit()) 255 mCbVirt->setChecked (true); 256 257 /* Save user's predefined settings in this chapter: */ 258 246 259 CBIOSSettings biosSettings = mMachine.GetBIOSSettings(); 247 260 … … 327 340 } 328 341 342 void VBoxVMSettingsGeneral::setValidator (QIWidgetValidator *aVal) 343 { 344 mValidator = aVal; 345 connect (mCbVirt, SIGNAL (stateChanged (int)), mValidator, SLOT (revalidate())); 346 connect (mOSTypeSelector, SIGNAL (osTypeChanged()), mValidator, SLOT (revalidate())); 347 } 348 329 349 bool VBoxVMSettingsGeneral::revalidate (QString &aWarning, QString & /* aTitle */) 330 350 { 351 /* System RAM & Video RAM sliders correlation test */ 331 352 ulong fullSize = vboxGlobal().virtualBox().GetHost().GetMemorySize(); 332 353 quint64 needBytes = VBoxGlobal::requiredVideoMemory (&mMachine); 333 334 354 if (mSlRam->value() + mSlVideo->value() > 0.75 * fullSize) 335 355 { … … 359 379 return true; 360 380 } 381 382 /* Guest OS type & VT-x/AMD-V option correlation test */ 383 if (mOSTypeSelector->type().GetIs64Bit() && !mCbVirt->isChecked()) 384 { 385 aWarning = tr ( 386 "there is a 64 bits guest OS type assigned for this VM, which " 387 "requires virtualization feature (VT-x/AMD-V) to be enabled " 388 "too, else your guest will fail to detect a 64 bits CPU and " 389 "will not be able to boot, so this feature will be enabled " 390 "automatically when you'll accept VM Settings by pressing OK " 391 "button."); 392 return true; 393 } 394 361 395 return true; 362 396 }
Note:
See TracChangeset
for help on using the changeset viewer.