- Timestamp:
- Mar 2, 2021 3:13:46 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r87907 r87915 85 85 setPage(Page1, new UIWizardNewVMPageBasic1(m_strGroup)); 86 86 setPage(Page2, new UIWizardNewVMPageBasic2); 87 setPage(Page8, new UIWizardNewVMPageBasic8); 87 88 setPage(Page4, new UIWizardNewVMPageBasic4); 88 setPage(Page8, new UIWizardNewVMPageBasic8);89 89 90 90 setStartId(Page1); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r87899 r87915 73 73 Page1, 74 74 Page2, 75 Page8, 75 76 Page4, 76 Page5,77 Page8,78 77 PageMax 79 78 }; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r87892 r87915 497 497 if (isUnattendedEnabled()) 498 498 return UIWizardNewVM::Page2; 499 return UIWizardNewVM::Page 4;499 return UIWizardNewVM::Page8; 500 500 } 501 501 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.cpp
r87914 r87915 380 380 { 381 381 bool fResult = true; 382 383 /* Make sure user really intents to creae a vm with no hard drive: */ 382 384 if (selectedDiskSource() == SelectedDiskSource_Empty) 383 385 { 384 386 /* Ask user about disk-less machine unless that's the recommendation: */ 385 387 if (!m_fRecommendedNoDisk) 386 fResult = msgCenter().confirmHardDisklessMachine(thisImp()); 387 } 388 { 389 if (!msgCenter().confirmHardDisklessMachine(thisImp())) 390 return false; 391 } 392 } 393 else if (selectedDiskSource() == SelectedDiskSource_New) 394 { 395 /* Check if the path we will be using for hard drive creation exists: */ 396 const QString strMediumPath(fieldImp("mediumPath").toString()); 397 fResult = !QFileInfo(strMediumPath).exists(); 398 if (!fResult) 399 { 400 msgCenter().cannotOverwriteHardDiskStorage(strMediumPath, this); 401 return fResult; 402 } 403 /* Check FAT size limitation of the host hard drive: */ 404 fResult = UIWizardNewVDPage3::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(), 405 fieldImp("mediumPath").toString(), 406 fieldImp("mediumSize").toULongLong()); 407 if (!fResult) 408 { 409 msgCenter().cannotCreateHardDiskStorageInFAT(strMediumPath, this); 410 return fResult; 411 } 412 } 413 414 startProcessing(); 415 if (selectedDiskSource() == SelectedDiskSource_New) 416 { 417 /* Try to create the hard drive:*/ 418 fResult = qobject_cast<UIWizardNewVM*>(wizard())->createVirtualDisk(); 419 /*Don't show any error message here since UIWizardNewVM::createVirtualDisk already does so: */ 420 if (!fResult) 421 return fResult; 422 } 423 fResult = qobject_cast<UIWizardNewVM*>(wizard())->createVM(); 424 endProcessing(); 425 388 426 return fResult; 389 427 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.h
r87914 r87915 138 138 139 139 bool isComplete() const; 140 bool validatePage();140 virtual bool validatePage() /* override */; 141 141 142 142 QIRichTextLabel *m_pLabel; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic8.cpp
r87903 r87915 152 152 return true; 153 153 } 154 155 bool UIWizardNewVMPageBasic8::validatePage()156 {157 bool fResult = true;158 159 const QString strMediumPath(fieldImp("mediumPath").toString());160 fResult = !QFileInfo(strMediumPath).exists();161 if (!fResult)162 {163 msgCenter().cannotOverwriteHardDiskStorage(strMediumPath, this);164 return fResult;165 }166 167 startProcessing();168 SelectedDiskSource enmDiskSource = field("selectedDiskSource").value<SelectedDiskSource>();169 if (enmDiskSource == SelectedDiskSource_New)170 {171 fResult = qobject_cast<UIWizardNewVM*>(wizard())->createVirtualDisk();172 fResult = UIWizardNewVDPage3::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(),173 fieldImp("mediumPath").toString(),174 fieldImp("mediumSize").toULongLong());175 if (!fResult)176 {177 msgCenter().cannotCreateHardDiskStorageInFAT(strMediumPath, this);178 return fResult;179 }180 }181 fResult = qobject_cast<UIWizardNewVM*>(wizard())->createVM();182 endProcessing();183 184 return fResult;185 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic8.h
r87864 r87915 106 106 107 107 bool isComplete() const; 108 virtual bool validatePage() /* override */;109 108 110 109 /** Widgets. */
Note:
See TracChangeset
for help on using the changeset viewer.