VirtualBox

Changeset 103680 in vbox


Ignore:
Timestamp:
Mar 5, 2024 12:31:30 PM (7 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10384: A bit of cleanup for UIGuestOSType.

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

Legend:

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

    r103674 r103680  
    116116
    117117UIGuestOSTypeManager::UIGuestOSFamilyInfo
    118 UIGuestOSTypeManager::getFamilies(bool fListAll, KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
     118UIGuestOSTypeManager::getFamilies(bool fListAll,
     119                                  KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    119120{
    120121    /* Return all families by default: */
     
    135136
    136137QStringList
    137 UIGuestOSTypeManager::getSubtypeListForFamilyId(const QString &strFamilyId,
    138                                                 KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
     138UIGuestOSTypeManager::getSubtypesForFamilyId(const QString &strFamilyId,
     139                                             KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    139140{
    140141    /* Prepare list by arch type: */
     
    157158
    158159UIGuestOSTypeManager::UIGuestOSTypeInfo
    159 UIGuestOSTypeManager::getTypeListForFamilyId(const QString &strFamilyId,
    160                                              KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
     160UIGuestOSTypeManager::getTypesForFamilyId(const QString &strFamilyId,
     161                                          KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    161162{
    162163    UIGuestOSTypeInfo typeInfoList;
     164    if (strFamilyId.isEmpty())
     165        return typeInfoList;
    163166    foreach (const UIGuestOSType &type, m_guestOSTypes)
    164167    {
     
    176179
    177180UIGuestOSTypeManager::UIGuestOSTypeInfo
    178 UIGuestOSTypeManager::getTypeListForSubtype(const QString &strSubtype,
    179                                             KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
     181UIGuestOSTypeManager::getTypesForSubtype(const QString &strSubtype,
     182                                         KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    180183{
    181184    UIGuestOSTypeInfo typeInfoList;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h

    r103674 r103680  
    150150    void reCacheGuestOSTypes();
    151151
    152     /** Returns a list of all families (id and description). */
    153     UIGuestOSFamilyInfo getFamilies(bool fListAll, KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
     152    /** Returns a list of all families. */
     153    UIGuestOSFamilyInfo getFamilies(bool fListAll,
     154                                    KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    154155    /** Returns the list of subtypes for @p strFamilyId. This may be an empty list. */
    155     QStringList         getSubtypeListForFamilyId(const QString &strFamilyId,
    156                                                   KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
     156    QStringList         getSubtypesForFamilyId(const QString &strFamilyId,
     157                                               KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    157158    /** Returns a list of OS types for the @p strFamilyId. */
    158     UIGuestOSTypeInfo   getTypeListForFamilyId(const QString &strFamilyId,
    159                                                KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
     159    UIGuestOSTypeInfo   getTypesForFamilyId(const QString &strFamilyId,
     160                                            KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    160161    /** Returns a list of OS types for the @p strSubtype. */
    161     UIGuestOSTypeInfo   getTypeListForSubtype(const QString &strSubtype,
    162                                               KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
     162    UIGuestOSTypeInfo   getTypesForSubtype(const QString &strSubtype,
     163                                           KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    163164
    164165    /** Returns whether specified @a strOSTypeId is of DOS type. */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp

    r103674 r103680  
    342342    const UIGuestOSTypeManager::UIGuestOSTypeInfo types
    343343         = m_strDistribution.isEmpty()
    344          ? uiCommon().guestOSTypeManager().getTypeListForFamilyId(m_strFamilyId, enmArch)
    345          : uiCommon().guestOSTypeManager().getTypeListForSubtype(m_strDistribution, enmArch);
     344         ? uiCommon().guestOSTypeManager().getTypesForFamilyId(m_strFamilyId, enmArch)
     345         : uiCommon().guestOSTypeManager().getTypesForSubtype(m_strDistribution, enmArch);
    346346
    347347    /* Save the most recently used item: */
     
    651651
    652652    /* Acquire a list of suitable sub-types: */
    653     const QStringList distributions = uiCommon().guestOSTypeManager().getSubtypeListForFamilyId(m_strFamilyId, enmArch);
     653    const QStringList distributions = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, enmArch);
    654654    m_pLabelDistribution->setEnabled(!distributions.isEmpty());
    655655    m_pComboDistribution->setEnabled(!distributions.isEmpty());
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestOSTypeSelectionButton.cpp

    r103674 r103680  
    114114        const UIFamilyInfo &fi = familyList.at(i);
    115115        QMenu *pSubMenu = m_pMainMenu->addMenu(fi.m_strDescription);
    116         QStringList subtypeList = uiCommon().guestOSTypeManager().getSubtypeListForFamilyId(fi.m_strId);
     116        QStringList subtypeList = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId);
    117117
    118118        if (subtypeList.isEmpty())
    119             createOSTypeMenu(uiCommon().guestOSTypeManager().getTypeListForFamilyId(fi.m_strId), pSubMenu);
     119            createOSTypeMenu(uiCommon().guestOSTypeManager().getTypesForFamilyId(fi.m_strId), pSubMenu);
    120120        else
    121121        {
    122122            foreach (const QString &strSubtype, subtypeList)
    123                 createOSTypeMenu(uiCommon().guestOSTypeManager().getTypeListForSubtype(strSubtype), pSubMenu->addMenu(strSubtype));
     123                createOSTypeMenu(uiCommon().guestOSTypeManager().getTypesForSubtype(strSubtype), pSubMenu->addMenu(strSubtype));
    124124        }
    125125    }
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