VirtualBox

Changeset 96640 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 7, 2022 6:10:07 PM (2 years ago)
Author:
vboxsync
Message:

FE/Qt: Call sltNameChanged if ISO detection failed to get a valid OS type ID. bugref:9515

File:
1 edited

Legend:

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

    r96639 r96640  
    598598    pWizard->setISOFilePath(strPath);
    599599
    600     if (UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId()))
     600    bool const fOsTypeFixed = UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor,
     601                                                                                             pWizard->detectedOSTypeId());
     602    if (fOsTypeFixed)
    601603        m_userModifiedParameters << "GuestOSTypeFromISO";
    602     else /* Remove GuestOSTypeFromISO fromthe set if it is there: */
     604    else /* Remove GuestOSTypeFromISO from the set if it is there: */
    603605        m_userModifiedParameters.remove("GuestOSTypeFromISO");
    604606
     
    619621    /* Disable OS type selector(s) to prevent user from changing guest OS type manually: */
    620622    if (m_pNameAndSystemEditor)
    621         m_pNameAndSystemEditor->setOSTypeStuffEnabled(pWizard->detectedOSTypeId().isEmpty());
     623    {
     624        m_pNameAndSystemEditor->setOSTypeStuffEnabled(fOsTypeFixed);
     625
     626        /* Redetect the OS type using the name if detection or the step above failed: */
     627        if (!fOsTypeFixed)
     628            sltNameChanged(m_pNameAndSystemEditor->name());
     629    }
    622630
    623631    emit completeChanged();
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