VirtualBox

Changeset 87885 in vbox


Ignore:
Timestamp:
Feb 26, 2021 1:23:06 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9950. Removing one of the 2 CMedium instances

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

    r87874 r87885  
    222222    }
    223223
     224    /* Inform UICommon about it: */
     225    uiCommon().createMedium(UIMedium(virtualDisk, UIMediumDeviceType_HardDisk, KMediumState_Created));
     226
    224227    /* Remember created virtual-disk: */
    225     m_virtualDisk = virtualDisk;
    226 
    227     /* Inform UICommon about it: */
    228     uiCommon().createMedium(UIMedium(m_virtualDisk, UIMediumDeviceType_HardDisk, KMediumState_Created));
     228    setVirtualDisk(virtualDisk);
    229229
    230230    return true;
     
    605605}
    606606
     607CMedium UIWizardNewVM::virtualDisk() const
     608{
     609    UIWizardNewVMPageBasic4 *pPage = qobject_cast<UIWizardNewVMPageBasic4*>(page(Page4));
     610    AssertPtrReturn(pPage, CMedium());
     611    return pPage->virtualDisk();
     612}
     613
     614void UIWizardNewVM::setVirtualDisk(const CMedium &medium)
     615{
     616    UIWizardNewVMPageBasic4 *pPage = qobject_cast<UIWizardNewVMPageBasic4*>(page(Page4));
     617    AssertPtrReturnVoid(pPage);
     618    pPage->setVirtualDisk(medium);
     619}
     620
    607621const UIUnattendedInstallData &UIWizardNewVM::unattendedInstallData() const
    608622{
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h

    r87872 r87885  
    120120    void setFieldsFromDefaultUnttendedInstallData();
    121121
     122    CMedium virtualDisk() const;
     123    void setVirtualDisk(const CMedium &medium);
     124
    122125    /* Variables: */
    123126    CMachine m_machine;
     
    129132    int m_iSASCount;
    130133    int m_iUSBCount;
    131     CMedium m_virtualDisk;
    132134
    133135    mutable UIUnattendedInstallData m_unattendedInstallData;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.h

    r87883 r87885  
    4242{
    4343
     44public:
     45
     46    const CMedium &virtualDisk() const { return m_virtualDisk; }
     47    void setVirtualDisk(const CMedium &virtualDisk) { m_virtualDisk = virtualDisk; }
     48
    4449protected:
    4550
     
    5560    /** @name Property getters/setters
    5661     * @{ */
    57        CMedium virtualDisk() const { return m_virtualDisk; }
    58        void setVirtualDisk(const CMedium &virtualDisk) { m_virtualDisk = virtualDisk; }
    5962       QUuid virtualDiskId() const { return m_uVirtualDiskId; }
    6063       void setVirtualDiskId(const QUuid &uVirtualDiskId) { m_uVirtualDiskId = uVirtualDiskId; }
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