VirtualBox

Ignore:
Timestamp:
Jul 8, 2021 3:42:09 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: Some more initialization fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp

    r90101 r90102  
    154154    retranslateUi();
    155155
     156    UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());
     157    AssertReturnVoid(pWizard);
    156158    /* Initialize user/password if they are not modified by the user: */
    157159    if (m_pUserNamePasswordEditor)
     
    159161        m_pUserNamePasswordEditor->blockSignals(true);
    160162        if (!m_userModifiedParameters.contains("UserName"))
    161         {
    162 
    163         }
     163            m_pUserNamePasswordEditor->setUserName(pWizard->userName());
     164        if (!m_userModifiedParameters.contains("Password"))
     165            m_pUserNamePasswordEditor->setPassword(pWizard->password());
    164166        m_pUserNamePasswordEditor->blockSignals(false);
    165 
     167    }
     168    if (m_pHostnameLineEdit && !m_userModifiedParameters.contains("Hostname"))
     169    {
     170        m_pHostnameLineEdit->blockSignals(true);
     171        m_pHostnameLineEdit->setText(pWizard->hostname());
     172        m_pHostnameLineEdit->blockSignals(false);
     173    }
     174    if (m_pGAInstallationISOContainer && !m_userModifiedParameters.contains("InstallGuestAdditions"))
     175    {
     176        m_pGAInstallationISOContainer->blockSignals(true);
     177        m_pGAInstallationISOContainer->setChecked(pWizard->installGuestAdditions());
     178        m_pGAInstallationISOContainer->blockSignals(false);
     179    }
     180
     181    if (m_pGAISOFilePathSelector && !m_userModifiedParameters.contains("GuestAdditionsISOPath"))
     182    {
     183        m_pGAISOFilePathSelector->blockSignals(true);
     184        m_pGAISOFilePathSelector->setPath(pWizard->guestAdditionsISOPath());
     185        m_pGAISOFilePathSelector->blockSignals(false);
    166186    }
    167187}
     
    192212    disableEnableGAWidgets(fEnabled);
    193213    newVMWizardPropertySet(InstallGuestAdditions, fEnabled);
     214    m_userModifiedParameters << "InstallGuestAdditions";
    194215    emit completeChanged();
    195216}
     
    198219{
    199220    newVMWizardPropertySet(GuestAdditionsISOPath, strPath);
     221    m_userModifiedParameters << "GuestAdditionsISOPath";
    200222    emit completeChanged();
    201223}
     
    204226{
    205227    newVMWizardPropertySet(Password, strPassword);
     228    m_userModifiedParameters << "Password";
    206229    emit completeChanged();
    207230}
     
    225248{
    226249    newVMWizardPropertySet(Hostname, strHostname);
     250    m_userModifiedParameters << "Hostname";
    227251}
    228252
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