VirtualBox

Changeset 105461 in vbox for trunk


Ignore:
Timestamp:
Jul 24, 2024 8:29:52 AM (6 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10384: In new VM wizard, guess OS type Id from user-entered VM name only if OS type Id is supported.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp

    r105119 r105461  
    317317}
    318318
     319bool UIGuestOSTypeManager::isGuestOSTypeIDSupported(const QString &strTypeId) const
     320{
     321    return m_supportedGuestOSTypeIDs.contains(strTypeId);
     322}
     323
    319324QString UIGuestOSTypeManager::getFamilyId(const QString &strTypeId) const
    320325{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h

    r105119 r105461  
    231231                                         KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    232232
     233    /* Returns true if @p strTypeId is supported by the host. */
     234    bool isGuestOSTypeIDSupported(const QString &strTypeId) const;
     235
    233236    /** Returns whether specified @a strOSTypeId is of DOS type. */
    234237    static bool isDOSType(const QString &strOSTypeId);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp

    r104899 r105461  
    300300    for (size_t i = 0; i < RT_ELEMENTS(gs_OSTypePattern); ++i)
    301301    {
    302         if (strNewName.contains(gs_OSTypePattern[i].pattern))
     302        if (   strNewName.contains(gs_OSTypePattern[i].pattern)
     303            && gpGlobalSession->guestOSTypeManager().isGuestOSTypeIDSupported(gs_OSTypePattern[i].pcstId))
     304        {
     305
    303306            return pNameAndSystemEditor->setGuestOSTypeByTypeId(gs_OSTypePattern[i].pcstId);
     307        }
    304308    }
    305309    return false;
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