VirtualBox

Changeset 90272 in vbox


Ignore:
Timestamp:
Jul 21, 2021 10:19:55 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145811
Message:

FE/Qt: bugref:9996. More fixes related to medium path updates

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp

    r90263 r90272  
    380380void UIMediumSizeAndPathGroupBox::setMediumPath(const QString &strMediumPath)
    381381{
    382     if (m_pLocationEditor)
    383         m_pLocationEditor->setText(strMediumPath);
     382    if (!m_pLocationEditor)
     383        return;
     384    m_pLocationEditor->blockSignals(true);
     385    m_pLocationEditor->setText(strMediumPath);
     386    m_pLocationEditor->blockSignals(false);
    384387}
    385388
     
    398401                                  arg(stripFormatExtension(fileInfo.fileName(), formatExtensions)).
    399402                                  arg(strDefaultExtension));
    400             m_pLocationEditor->setText(newFileInfo.absoluteFilePath());
     403            setMediumPath(newFileInfo.absoluteFilePath());
    401404        }
    402405    }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r90263 r90272  
    126126        UIWizardNewVMNameOSTypePage::guessOSTypeFromName(m_pNameAndSystemEditor, strNewName);
    127127    UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard()));
    128     if (!m_userModifiedParameters.contains("MediumPath"))
     128    if (!m_userModifiedParameters.contains("MediumPath") && m_pSizeAndLocationGroup)
     129    {
    129130        updateVirtualMediumPathFromMachinePathName();
     131        newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath());
     132    }
    130133    if (!m_userModifiedParameters.contains("HostnameDomainName"))
    131134        updateHostnameDomainNameFromMachineName();
     
    137140    Q_UNUSED(strNewPath);
    138141    UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, qobject_cast<UIWizardNewVM*>(wizard()));
    139     if (!m_userModifiedParameters.contains("MediumPath"))
     142    if (!m_userModifiedParameters.contains("MediumPath") && m_pSizeAndLocationGroup)
     143    {
    140144        updateVirtualMediumPathFromMachinePathName();
     145        newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath());
     146    }
    141147}
    142148
     
    375381void UIWizardNewVMPageExpert::initializePage()
    376382{
     383    /* We need not to check existence of parameter within m_userModifiedParameters since initializePage() runs
     384        once the page loads before user has a chance to modify parameters explicitly: */
    377385    UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
    378386    AssertReturnVoid(pWizard);
     
    390398        if (m_pFormatButtonGroup)
    391399            newVMWizardPropertySet(MediumFormat, m_pFormatButtonGroup->mediumFormat());
    392         if (!m_userModifiedParameters.contains("MediumPath"))
    393             updateVirtualMediumPathFromMachinePathName();
     400        /* First set value for medium path in widget the wizard: */
     401        updateVirtualMediumPathFromMachinePathName();
     402        newVMWizardPropertySet(MediumPath, m_pSizeAndLocationGroup->mediumPath());
    394403    }
    395404
     
    398407    {
    399408        m_pUserNamePasswordGroupBox->blockSignals(true);
    400         if (!m_userModifiedParameters.contains("UserName"))
    401             m_pUserNamePasswordGroupBox->setUserName(pWizard->userName());
    402         if (!m_userModifiedParameters.contains("Password"))
    403             m_pUserNamePasswordGroupBox->setPassword(pWizard->password());
     409        m_pUserNamePasswordGroupBox->setUserName(pWizard->userName());
     410        m_pUserNamePasswordGroupBox->setPassword(pWizard->password());
    404411        m_pUserNamePasswordGroupBox->blockSignals(false);
    405412    }
    406     if (!m_userModifiedParameters.contains("HostnameDomainName"))
    407         updateHostnameDomainNameFromMachineName();
    408 
    409     if (m_pGAInstallationISOContainer && !m_userModifiedParameters.contains("InstallGuestAdditions"))
     413    updateHostnameDomainNameFromMachineName();
     414
     415    if (m_pGAInstallationISOContainer)
    410416    {
    411417        m_pGAInstallationISOContainer->blockSignals(true);
Note: See TracChangeset for help on using the changeset viewer.

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