Changeset 91616 in vbox
- Timestamp:
- Oct 7, 2021 10:50:28 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp
r91593 r91616 313 313 ULONG recommendedRam = type.GetRecommendedRAM(); 314 314 315 /* Set memory size of the widget and (through signals) wizard: */ 316 if (m_pHardwareWidgetContainer && !m_userModifiedParameters.contains("MemorySize")) 317 m_pHardwareWidgetContainer->setMemorySize(recommendedRam); 318 319 320 KFirmwareType fwType = type.GetRecommendedFirmware(); 321 if (m_pHardwareWidgetContainer && !m_userModifiedParameters.contains("EFIEnabled")) 315 if (m_pHardwareWidgetContainer) 322 316 { 323 317 m_pHardwareWidgetContainer->blockSignals(true); 324 m_pHardwareWidgetContainer->setEFIEnabled(fwType != KFirmwareType_BIOS); 318 319 /* Set memory size of the widget and the wizard: */ 320 if (!m_userModifiedParameters.contains("MemorySize")) 321 { 322 m_pHardwareWidgetContainer->setMemorySize(recommendedRam); 323 pWizard->setMemorySize(recommendedRam); 324 } 325 326 /* Set Firmware Type of the widget and the wizard: */ 327 KFirmwareType fwType = type.GetRecommendedFirmware(); 328 if (!m_userModifiedParameters.contains("EFIEnabled")) 329 { 330 m_pHardwareWidgetContainer->setEFIEnabled(fwType != KFirmwareType_BIOS); 331 pWizard->setEFIEnabled(fwType != KFirmwareType_BIOS); 332 } 333 334 /* Initialize CPU count:*/ 335 int iCPUCount = type.GetRecommendedCPUCount(); 336 if (!m_userModifiedParameters.contains("CPUCount")) 337 { 338 m_pHardwareWidgetContainer->setCPUCount(iCPUCount); 339 pWizard->setCPUCount(iCPUCount); 340 } 325 341 m_pHardwareWidgetContainer->blockSignals(false); 326 342 } 343 327 344 LONG64 iRecommendedDiskSize = type.GetRecommendedHDD(); 328 329 345 /* Prepare initial disk choice: */ 330 346 if (!m_userModifiedParameters.contains("SelectedDiskSource")) … … 766 782 AssertReturnVoid(wizardWindow<UIWizardNewVM>()); 767 783 wizardWindow<UIWizardNewVM>()->setCPUCount(iCount); 784 m_userModifiedParameters << "CPUCount"; 768 785 } 769 786 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.cpp
r91474 r91616 84 84 if (!type.isNull()) 85 85 { 86 m_pHardwareWidgetContainer->blockSignals(true); 86 87 if (!m_userModifiedParameters.contains("MemorySize")) 87 88 { 88 89 ULONG recommendedRam = type.GetRecommendedRAM(); 89 90 m_pHardwareWidgetContainer->setMemorySize(recommendedRam); 91 pWizard->setMemorySize(recommendedRam); 90 92 } 91 93 if (!m_userModifiedParameters.contains("CPUCount")) … … 93 95 ULONG recommendedCPUs = type.GetRecommendedCPUCount(); 94 96 m_pHardwareWidgetContainer->setCPUCount(recommendedCPUs); 97 pWizard->setCPUCount(recommendedCPUs); 95 98 } 96 99 if (!m_userModifiedParameters.contains("EFIEnabled")) … … 98 101 KFirmwareType fwType = type.GetRecommendedFirmware(); 99 102 m_pHardwareWidgetContainer->setEFIEnabled(fwType != KFirmwareType_BIOS); 103 pWizard->setEFIEnabled(fwType != KFirmwareType_BIOS); 100 104 } 105 m_pHardwareWidgetContainer->blockSignals(false); 101 106 } 102 107 }
Note:
See TracChangeset
for help on using the changeset viewer.