- Timestamp:
- Jun 19, 2020 12:07:26 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r84874 r84880 131 131 /* The newer and less tested way of configuring vms: */ 132 132 m_machine.ApplyDefaults(QString()); 133 /* correct the RAM size. IMachine::applyDefaults may have overwritten the user setting: */133 /* Apply user preferences again. IMachine::applyDefaults may have overwritten the user setting: */ 134 134 m_machine.SetMemorySize(field("baseMemory").toUInt()); 135 m_machine.SetCPUCount(field("VCPUCount").toUInt()); 135 136 /* Correct the VRAM size since API does not take fullscreen memory requirements into account: */ 136 137 CGraphicsAdapter comGraphics = m_machine.GetGraphicsAdapter(); … … 155 156 /* RAM size: */ 156 157 m_machine.SetMemorySize(field("baseMemory").toInt()); 158 /* VCPU count: */ 159 m_machine.SetCPUCount(field("VCPUCount").toUInt()); 160 157 161 158 162 /* Graphics Controller type: */ … … 375 379 case WizardMode_Basic: 376 380 { 377 UIWizardNewVMPageBasic1 *pPage1 = qobject_cast<UIWizardNewVMPageBasic1*> (page(Page1)); 378 if (pPage1) 379 pPage1->cleanupMachineFolder(true); 381 UIWizardNewVMPageBasic1 *pPage = qobject_cast<UIWizardNewVMPageBasic1*> (page(Page2)); 382 /* Make sure that we were able to find the page that created the folder. */ 383 Assert(pPage); 384 if (pPage) 385 pPage->cleanupMachineFolder(true); 380 386 break; 381 387 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
r84879 r84880 47 47 } 48 48 49 int UIWizardNewVMPage2::VCPUCount() const 50 { 51 if (!m_pVirtualCPUEditor) 52 return 1; 53 return m_pVirtualCPUEditor->value(); 54 } 55 49 56 UIWizardNewVMPageBasic2::UIWizardNewVMPageBasic2() 50 57 : m_pLabel(0) … … 70 77 /* Register fields: */ 71 78 registerField("baseMemory", this, "baseMemory"); 79 registerField("VCPUCount", this, "VCPUCount"); 72 80 } 73 81 … … 90 98 CGuestOSType type = field("type").value<CGuestOSType>(); 91 99 m_pBaseMemoryEditor->setValue(type.GetRecommendedRAM()); 100 m_pVirtualCPUEditor->setValue(1); 92 101 93 102 /* 'Ram' field should have focus initially: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.h
r84879 r84880 42 42 43 43 int baseMemory() const; 44 int VCPUCount() const; 44 45 45 46 /* Widgets: */ … … 53 54 Q_OBJECT; 54 55 Q_PROPERTY(int baseMemory READ baseMemory); 56 Q_PROPERTY(int VCPUCount READ VCPUCount); 55 57 56 58 public:
Note:
See TracChangeset
for help on using the changeset viewer.