VirtualBox

Changeset 102281 in vbox


Ignore:
Timestamp:
Nov 23, 2023 7:48:16 PM (12 months ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

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

    r102162 r102281  
    3434
    3535
    36 UIGuestOSTypeManager::UIGuestOSTypeManager()
    37 {
    38 }
    39 
    4036void UIGuestOSTypeManager::reCacheGuestOSTypes(const CGuestOSTypeVector &guestOSTypes)
    4137{
     
    4339    m_guestOSTypes.clear();
    4440    m_guestOSFamilies.clear();
    45 
     41    m_guestOSFamilyArch.clear();
     42    m_guestOSSubtypeArch.clear();
     43
     44    /* Enumerate guest OS types: */
    4645    QVector<CGuestOSType> otherOSTypes;
    4746    foreach (const CGuestOSType &comType, guestOSTypes)
    4847    {
     48        /* Filter out "other" family types: */
    4949        if (comType.GetFamilyId().contains("other", Qt::CaseInsensitive))
    5050        {
     
    5454        addGuestOSType(comType);
    5555    }
    56     /* Add OS types with family other to the end of the lists: */
     56
     57    /* Add OS types with family "other" to the end of the lists: */
    5758    foreach (const CGuestOSType &comType, otherOSTypes)
    5859        addGuestOSType(comType);
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h

    r102162 r102281  
    3333
    3434/* Qt includes: */
    35 #include <QVector>
    3635#include <QMap>
    3736#include <QString>
     37#include <QVector>
    3838
    3939/* COM includes: */
    4040#include "COMEnums.h"
    4141#include "CGuestOSType.h"
    42 
    43 class UIGuestOSType;
    4442
    4543/** A wrapper around CGuestOSType. Some of the properties are cached here for performance. */
     
    4846
    4947public:
    50 
    5148
    5249    UIGuestOSType(const CGuestOSType &comGuestOSType);
     
    9794class SHARED_LIBRARY_STUFF UIGuestOSTypeManager
    9895{
    99 
    10096public:
    101 
    102     UIGuestOSTypeManager();
    103     UIGuestOSTypeManager(const UIGuestOSTypeManager &other) = delete;
    10497
    10598    /** OS info pair. 'first' is id and 'second' is description. */
     
    109102    /** A list of all OS type pairs. */
    110103    typedef QVector<UIGuestInfoPair> UIGuestOSTypeInfo;
     104
     105    /** Constructs guest OS type manager. */
     106    UIGuestOSTypeManager() {}
     107    /** Prohibits to copy guest OS type manager. */
     108    UIGuestOSTypeManager(const UIGuestOSTypeManager &other) = delete;
    111109
    112110    /** Re-create the guest OS type database. */
     
    125123                                              KPlatformArchitecture enmArch = KPlatformArchitecture_None) const;
    126124
     125    /** Returns whether specified @a strOSTypeId is of DOS type. */
    127126    static bool isDOSType(const QString &strOSTypeId);
    128127
    129     /** @name Getters for UIGuestOSType properties. They utilize a map for faster access to UIGuestOSType instance with @p strTypeId
     128    /** @name Getters for UIGuestOSType properties.
     129      * They utilize a map for faster access to UIGuestOSType instance with @p strTypeId.
    130130      * @{ */
    131131        QString                 getFamilyId(const QString &strTypeId) const;
     
    149149private:
    150150
     151    /** Adds certain @a comType to internal cache. */
    151152    void addGuestOSType(const CGuestOSType &comType);
    152153
     
    165166};
    166167
    167 
    168168#endif /* !FEQT_INCLUDED_SRC_globals_UIGuestOSType_h */
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