VirtualBox

Changeset 87899 in vbox


Ignore:
Timestamp:
Mar 1, 2021 4:43:03 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9950. Misc. fixes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h

    r87885 r87899  
    5050    QString m_strGuestAdditionsISOPath;
    5151};
     52
     53enum SelectedDiskSource
     54{
     55    SelectedDiskSource_Empty = 0,
     56    SelectedDiskSource_New,
     57    SelectedDiskSource_Existing,
     58    SelectedDiskSource_Max
     59};
     60
     61Q_DECLARE_METATYPE(SelectedDiskSource);
    5262
    5363/** New Virtual Machine wizard: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.cpp

    r87892 r87899  
    3232#include "UIMessageCenter.h"
    3333#include "UIWizardNewVD.h"
    34 #include "UIWizardNewVM.h"
    3534#include "UIWizardNewVMPageBasic4.h"
    36 
    37 Q_DECLARE_METATYPE(SelectedDiskSource);
    3835
    3936UIWizardNewVMPage4::UIWizardNewVMPage4()
     
    7673        /* Focus on hard disk combo: */
    7774        m_pDiskSelector->setFocus();
     75        m_virtualDisk = uiCommon().medium(uMediumId).medium();
    7876    }
    7977}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.h

    r87892 r87899  
    2727/* GUI includes: */
    2828#include "UIWizardPage.h"
     29#include "UIWizardNewVM.h"
    2930
    3031/* COM includes: */
     
    3940class UIMediaComboBox;
    4041
    41 enum SelectedDiskSource
    42 {
    43     SelectedDiskSource_Empty = 0,
    44     SelectedDiskSource_New,
    45     SelectedDiskSource_Existing,
    46     SelectedDiskSource_Max
    47 };
    4842
    4943class UIWizardNewVMPage4 : public UIWizardPageBase
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic8.cpp

    r87878 r87899  
    165165    }
    166166
    167     fResult = UIWizardNewVDPage3::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(),
    168                                                          fieldImp("mediumPath").toString(),
    169                                                          fieldImp("mediumSize").toULongLong());
    170     if (!fResult)
    171     {
    172         msgCenter().cannotCreateHardDiskStorageInFAT(strMediumPath, this);
    173         return fResult;
    174     }
    175167
    176168
    177169    startProcessing();
    178170
    179     fResult = qobject_cast<UIWizardNewVM*>(wizard())->createVirtualDisk();
     171    SelectedDiskSource enmDiskSource = field("selectedDiskSource").value<SelectedDiskSource>();
     172    if (enmDiskSource == SelectedDiskSource_New)
     173    {
     174        fResult = qobject_cast<UIWizardNewVM*>(wizard())->createVirtualDisk();
     175        fResult = UIWizardNewVDPage3::checkFATSizeLimitation(fieldImp("mediumVariant").toULongLong(),
     176                                                             fieldImp("mediumPath").toString(),
     177                                                             fieldImp("mediumSize").toULongLong());
     178        if (!fResult)
     179        {
     180            msgCenter().cannotCreateHardDiskStorageInFAT(strMediumPath, this);
     181            return fResult;
     182        }
     183    }
    180184    fResult = qobject_cast<UIWizardNewVM*>(wizard())->createVM();
    181185
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