Changeset 14664 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 26, 2008 9:19:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewVMWzd.ui.h
r13580 r14664 291 291 CVirtualBox vbox = vboxGlobal().virtualBox(); 292 292 293 /* OS type */ 294 CGuestOSType type = vboxGlobal().vmGuestOSType (cbOS->currentItem()); 295 AssertMsg (!type.isNull(), ("vmGuestOSType() must return non-null type")); 296 QString typeId = type.GetId(); 297 293 298 /* create a machine with the default settings file location */ 294 299 if (mMachine.isNull()) 295 300 { 296 mMachine = vbox.CreateMachine ( QString(), leName->text(), QUuid());301 mMachine = vbox.CreateMachine (leName->text(), typeId, QString::null, QUuid()); 297 302 if (!vbox.isOk()) 298 303 { … … 308 313 } 309 314 310 /* name is set in CreateMachine() */311 312 /* OS type */313 CGuestOSType type = vboxGlobal().vmGuestOSType (cbOS->currentItem());314 AssertMsg (!type.isNull(), ("vmGuestOSType() must return non-null type"));315 QString typeId = type.GetId();316 mMachine.SetOSTypeId (typeId);317 318 if (typeId == "os2warp3" ||319 typeId == "os2warp4" ||320 typeId == "os2warp45" ||321 typeId == "ecs")322 mMachine.SetHWVirtExEnabled (KTSBool_True);323 324 315 /* RAM size */ 325 316 mMachine.SetMemorySize (slRAM->value()); 326 327 /* add one network adapter (NAT) by default */328 {329 CNetworkAdapter cadapter = mMachine.GetNetworkAdapter (0);330 #ifdef VBOX_WITH_E1000331 /* Default to e1k on solaris */332 if (typeId == "solaris" ||333 typeId == "opensolaris")334 cadapter.SetAdapterType (KNetworkAdapterType_I82540EM);335 #endif /* VBOX_WITH_E1000 */336 cadapter.SetEnabled (true);337 cadapter.AttachToNAT();338 cadapter.SetMACAddress (QString::null);339 cadapter.SetCableConnected (true);340 341 }342 317 343 318 /* register the VM prior to attaching hard disks */
Note:
See TracChangeset
for help on using the changeset viewer.