VirtualBox

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


Ignore:
Timestamp:
Aug 1, 2024 11:10:28 AM (4 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10736. Switching to new vd wizard for clonning as well.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r105520 r105561  
    12781278            }
    12791279            case WizardType_CloneVD:
    1280                 m_wizards[enmType] = new UIWizardCloneVD(this, m_uMediumId);
     1280                m_wizards[enmType] = new UIWizardNewVD(this, m_uMediumId);
    12811281                break;
    12821282            default:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp

    r105558 r105561  
    8181
    8282    m_strDefaultPath = QDir::toNativeSeparators(QFileInfo(m_comSourceVirtualDisk.GetLocation()).absolutePath());
    83     m_strDefaultName = QString("%1_%2").arg(m_comSourceVirtualDisk.GetName()).arg(UIWizardNewVD::tr("copy"));
     83    m_strDefaultName = QString("%1_%2").arg(QFileInfo(m_comSourceVirtualDisk.GetName()).baseName()).arg(UIWizardNewVD::tr("copy"));
    8484    m_uDefaultSize = m_comSourceVirtualDisk.GetLogicalSize();
    8585    m_enmDeviceType = m_comSourceVirtualDisk.GetDeviceType();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.cpp

    r105554 r105561  
    158158    pWizard->setMediumFormat(comMediumFormat);
    159159
    160 
    161160    QString strExtension = UIWizardDiskEditors::defaultExtension(comMediumFormat, pWizard->deviceType());
    162161    QString strMediumFilePath =
    163162        UIWizardDiskEditors::constructMediumFilePath(UIWizardDiskEditors::appendExtension(pWizard->defaultName(),
    164163                                                                                          strExtension), pWizard->defaultPath());
    165 
    166 
    167 
    168164    m_pSizeAndPathGroup->blockSignals(true);
    169165    m_pSizeAndPathGroup->setMediumFilePath(strMediumFilePath);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDSizeLocationPage.cpp

    r105554 r105561  
    5252    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    5353    AssertReturnVoid(pMainLayout);
    54     m_pMediumSizePathGroup = new UIMediumSizeAndPathGroupBox(false /* fExpertMode */, 0 /* parent */, _4M /* minimum size */);
     54    m_pMediumSizePathGroup = new UIMediumSizeAndPathGroupBox(false /* fExpertMode */, 0 /* parent */, m_uMediumSizeMin);
    5555    connect(m_pMediumSizePathGroup, &UIMediumSizeAndPathGroupBox::sigMediumSizeChanged,
    5656            this, &UIWizardNewVDSizeLocationPage::sltMediumSizeChanged);
     
    150150    if (pWizard->mediumSize() > m_uMediumSizeMax || pWizard->mediumSize() < m_uMediumSizeMin)
    151151        return false;
     152    if (!m_pMediumSizePathGroup->filePathUnique() || !m_pMediumSizePathGroup->pathExists())
     153        return false;
    152154    return true;
    153155}
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