VirtualBox

Changeset 96642 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 7, 2022 7:20:35 PM (2 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9515. In expert page of new vm wizard, re-guess guest OS type from user entered name in case OS detection from ISO fails.

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

Legend:

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

    r96407 r96642  
    167167    pWizard->setISOFilePath(strISOPath);
    168168
    169     if (UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId()))
     169    bool const fOsTypeFixed = UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(m_pNameAndSystemEditor, pWizard->detectedOSTypeId());
     170    if (fOsTypeFixed)
    170171        m_userModifiedParameters << "GuestOSTypeFromISO";
    171172    else /* Remove GuestOSTypeFromISO from the set if it is there: */
     
    183184    setSkipCheckBoxEnable();
    184185    disableEnableUnattendedRelatedWidgets(isUnattendedEnabled());
     186
     187    /* Redetect the OS type using the name if detection or the step above failed: */
     188    if (!fOsTypeFixed)
     189        sltNameChanged(m_pNameAndSystemEditor->name());
     190
    185191    emit completeChanged();
    186192}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp

    r96641 r96642  
    300300    pNameAndSystemEditor->setType(uiCommon().vmGuestOSType("Other"));
    301301    /* Return false to allow OS type guessing from name. See caller code: */
    302     /** @todo the caller doesn't actually re-guess from the name, which leaves it
    303      *        with this annoying 'other' selection. */
    304302    return false;
    305303}
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