- Timestamp:
- Apr 25, 2019 8:12:53 AM (6 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/UIWizardNewVM.cpp
r78271 r78286 120 120 } 121 121 122 if (configureVM(strTypeId, type)) 123 return attachDefaultDevices(type); 124 return false; 125 } 126 127 bool UIWizardNewVM::configureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType) 122 #if 1 123 /* Configure the newly created vm here in GUI by several calls to API. */ 124 configureVM(strTypeId, type); 125 #else 126 /* The newer and less tested way of configuring vms. */ 127 m_machine.ApplyDefaults(QString()); 128 #endif 129 130 /* Register the VM prior to attaching hard disks: */ 131 vbox.RegisterMachine(m_machine); 132 if (!vbox.isOk()) 133 { 134 msgCenter().cannotRegisterMachine(vbox, m_machine.GetName(), this); 135 return false; 136 } 137 return attachDefaultDevices(type); 138 } 139 140 void UIWizardNewVM::configureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType) 128 141 { 129 142 CVirtualBox vbox = vboxGlobal().virtualBox(); … … 262 275 if (comGuestType.GetRecommended3DAcceleration()) 263 276 m_machine.SetAccelerate3DEnabled(comGuestType.GetRecommended3DAcceleration()); 264 265 /* Register the VM prior to attaching hard disks: */266 vbox.RegisterMachine(m_machine);267 if (!vbox.isOk())268 {269 msgCenter().cannotRegisterMachine(vbox, m_machine.GetName(), this);270 return false;271 }272 return true;273 277 } 274 278 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r78271 r78286 64 64 bool createVM(); 65 65 /* Configures the newly created VM: */ 66 boolconfigureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType);66 void configureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType); 67 67 /* Attaches default devices: */ 68 68 bool attachDefaultDevices(const CGuestOSType &comGuestType);
Note:
See TracChangeset
for help on using the changeset viewer.