VirtualBox

Ignore:
Timestamp:
Mar 18, 2024 12:48:07 PM (13 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162265
Message:

FE/Qt: bugref:10384: UIGuestOSType: A bit of cleanup for family/subtype/type stuff.

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

Legend:

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

    r103871 r103893  
    133133
    134134UIGuestOSTypeManager::UIGuestOSFamilyInfo
    135 UIGuestOSTypeManager::getFamilies(bool fListAll,
     135UIGuestOSTypeManager::getFamilies(bool fListAll /* = true */,
    136136                                  KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    137137{
     
    152152UIGuestOSTypeManager::UIGuestOSSubtypeInfo
    153153UIGuestOSTypeManager::getSubtypesForFamilyId(const QString &strFamilyId,
    154                                              bool fListAll,
     154                                             bool fListAll /* = true */,
    155155                                             KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    156156{
     
    171171UIGuestOSTypeManager::UIGuestOSTypeInfo
    172172UIGuestOSTypeManager::getTypesForFamilyId(const QString &strFamilyId,
    173                                           bool fListAll,
     173                                          bool fListAll /* = true */,
    174174                                          KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    175175{
     
    195195UIGuestOSTypeManager::UIGuestOSTypeInfo
    196196UIGuestOSTypeManager::getTypesForSubtype(const QString &strSubtype,
    197                                          bool fListAll,
     197                                         bool fListAll /* = true */,
    198198                                         KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    199199{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h

    r103871 r103893  
    192192    /** Returns a list of all families.
    193193      * @param  fListAll  Brings whether a list of all families is requested, supported otherwise. */
    194     UIGuestOSFamilyInfo getFamilies(bool fListAll,
     194    UIGuestOSFamilyInfo getFamilies(bool fListAll = true,
    195195                                    KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    196196    /** Returns the list of subtypes for @p strFamilyId. This may be an empty list.
    197197      * @param  fListAll  Brings whether a list of all subtypes is requested, supported otherwise. */
    198198    UIGuestOSSubtypeInfo getSubtypesForFamilyId(const QString &strFamilyId,
    199                                                 bool fListAll,
     199                                                bool fListAll = true,
    200200                                                KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    201201    /** Returns a list of OS types for the @p strFamilyId. */
    202202    UIGuestOSTypeInfo getTypesForFamilyId(const QString &strFamilyId,
    203                                           bool fListAll,
     203                                          bool fListAll = true,
    204204                                          KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    205205    /** Returns a list of OS types for the @p strSubtype. */
    206206    UIGuestOSTypeInfo getTypesForSubtype(const QString &strSubtype,
    207                                          bool fListAll,
     207                                         bool fListAll = true,
    208208                                         KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    209209
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp

    r103871 r103893  
    343343    const UIGuestOSTypeManager::UIGuestOSTypeInfo types
    344344         = m_strDistribution.isEmpty()
    345          ? gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(m_strFamilyId, false, enmArch)
    346          : gpGlobalSession->guestOSTypeManager().getTypesForSubtype(m_strDistribution, false, enmArch);
     345         ? gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(m_strFamilyId, false /* including restricted? */, enmArch)
     346         : gpGlobalSession->guestOSTypeManager().getTypesForSubtype(m_strDistribution, false /* including restricted? */, enmArch);
    347347
    348348    /* Save the most recently used item: */
     
    618618    /* Acquire family IDs: */
    619619    const UIGuestOSTypeManager::UIGuestOSFamilyInfo families
    620         = gpGlobalSession->guestOSTypeManager().getFamilies(false, enmArch);
     620        = gpGlobalSession->guestOSTypeManager().getFamilies(false /* including restricted? */, enmArch);
    621621
    622622    /* Block signals initially and clear the combo: */
     
    654654    /* Acquire a list of suitable sub-types: */
    655655    const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions
    656         = gpGlobalSession->guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, false, enmArch);
     656        = gpGlobalSession->guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, false /* including restricted? */, enmArch);
    657657    m_pLabelDistribution->setEnabled(!distributions.isEmpty());
    658658    m_pComboDistribution->setEnabled(!distributions.isEmpty());
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestOSTypeSelectionButton.cpp

    r103871 r103893  
    107107
    108108    const UIGuestOSTypeManager::UIGuestOSFamilyInfo families
    109         = gpGlobalSession->guestOSTypeManager().getFamilies(true);
     109        = gpGlobalSession->guestOSTypeManager().getFamilies();
    110110
    111111    for (int i = 0; i < families.size(); ++i)
     
    114114        QMenu *pSubMenu = m_pMainMenu->addMenu(fi.m_strDescription);
    115115        const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions
    116             = gpGlobalSession->guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId, true);
     116            = gpGlobalSession->guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId);
    117117
    118118        if (distributions.isEmpty())
    119             createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(fi.m_strId, true), pSubMenu);
     119            createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(fi.m_strId), pSubMenu);
    120120        else
    121121        {
    122122            foreach (const UISubtypeInfo &distribution, distributions)
    123                 createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForSubtype(distribution.m_strName, true),
     123                createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForSubtype(distribution.m_strName),
    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