VirtualBox

Changeset 78286 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 25, 2019 8:12:53 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8664. Adding IMachine::appyDefaults call (disabled).

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  
    120120    }
    121121
    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
     140void UIWizardNewVM::configureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType)
    128141{
    129142    CVirtualBox vbox = vboxGlobal().virtualBox();
     
    262275    if (comGuestType.GetRecommended3DAcceleration())
    263276        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;
    273277}
    274278
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h

    r78271 r78286  
    6464    bool createVM();
    6565    /* Configures the newly created VM: */
    66     bool configureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType);
     66    void configureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType);
    6767    /* Attaches default devices: */
    6868    bool attachDefaultDevices(const CGuestOSType &comGuestType);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette