VirtualBox

Changeset 103871 in vbox


Ignore:
Timestamp:
Mar 15, 2024 3:58:13 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162242
Message:

FE/Qt: bugref:10384: UIGuestOSType: Filter out types acquired for particular family/subtype according to cached supported information; That is especially useful for New VM wizard and VM settings.

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

Legend:

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

    r103870 r103871  
    171171UIGuestOSTypeManager::UIGuestOSTypeInfo
    172172UIGuestOSTypeManager::getTypesForFamilyId(const QString &strFamilyId,
     173                                          bool fListAll,
    173174                                          KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    174175{
     
    178179    foreach (const UIGuestOSType &type, m_guestOSTypes)
    179180    {
     181        if (!fListAll && !type.isSupported())
     182            continue;
    180183        if (type.getFamilyId() != strFamilyId)
    181184            continue;
     
    192195UIGuestOSTypeManager::UIGuestOSTypeInfo
    193196UIGuestOSTypeManager::getTypesForSubtype(const QString &strSubtype,
     197                                         bool fListAll,
    194198                                         KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    195199{
     
    199203    foreach (const UIGuestOSType &type, m_guestOSTypes)
    200204    {
     205        if (!fListAll && !type.isSupported())
     206            continue;
    201207        if (type.getSubtype() != strSubtype)
    202208            continue;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h

    r103870 r103871  
    201201    /** Returns a list of OS types for the @p strFamilyId. */
    202202    UIGuestOSTypeInfo getTypesForFamilyId(const QString &strFamilyId,
     203                                          bool fListAll,
    203204                                          KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    204205    /** Returns a list of OS types for the @p strSubtype. */
    205206    UIGuestOSTypeInfo getTypesForSubtype(const QString &strSubtype,
     207                                         bool fListAll,
    206208                                         KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    207209
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp

    r103771 r103871  
    343343    const UIGuestOSTypeManager::UIGuestOSTypeInfo types
    344344         = m_strDistribution.isEmpty()
    345          ? gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(m_strFamilyId, enmArch)
    346          : gpGlobalSession->guestOSTypeManager().getTypesForSubtype(m_strDistribution, enmArch);
     345         ? gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(m_strFamilyId, false, enmArch)
     346         : gpGlobalSession->guestOSTypeManager().getTypesForSubtype(m_strDistribution, false, enmArch);
    347347
    348348    /* Save the most recently used item: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestOSTypeSelectionButton.cpp

    r103771 r103871  
    117117
    118118        if (distributions.isEmpty())
    119             createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(fi.m_strId), pSubMenu);
     119            createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(fi.m_strId, true), pSubMenu);
    120120        else
    121121        {
    122122            foreach (const UISubtypeInfo &distribution, distributions)
    123                 createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForSubtype(distribution.m_strName),
     123                createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForSubtype(distribution.m_strName, true),
    124124                                 pSubMenu->addMenu(distribution.m_strName));
    125125        }
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