VirtualBox

Changeset 102282 in vbox


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

FE/Qt: bugref:10543: A bit of rework for UIGuestOSType; Make sure only supported guest OS types enumerated on per architecture basis.

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

Legend:

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

    r102274 r102282  
    14111411    {
    14121412        m_pGuestOSTypeManager = new UIGuestOSTypeManager;
    1413         m_pGuestOSTypeManager->reCacheGuestOSTypes(m_comVBox.GetGuestOSTypes());
     1413        m_pGuestOSTypeManager->reCacheGuestOSTypes();
    14141414    }
    14151415
     
    29722972    /* Re-initialize guest OS type database: */
    29732973    if (m_pGuestOSTypeManager)
    2974         m_pGuestOSTypeManager->reCacheGuestOSTypes(m_comVBox.GetGuestOSTypes());
     2974        m_pGuestOSTypeManager->reCacheGuestOSTypes();
    29752975
    29762976    /* Mark wrappers valid: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp

    r102281 r102282  
    3232/* COM includes: */
    3333#include "CGuestOSType.h"
    34 
    35 
    36 void UIGuestOSTypeManager::reCacheGuestOSTypes(const CGuestOSTypeVector &guestOSTypes)
    37 {
     34#include "CPlatformProperties.h"
     35#include "CSystemProperties.h"
     36
     37
     38void UIGuestOSTypeManager::reCacheGuestOSTypes()
     39{
     40    /* Acquire a list of guest OS types supported by this host: */
     41    CGuestOSTypeVector guestOSTypes;
     42    CSystemProperties comSysProps = uiCommon().virtualBox().GetSystemProperties();
     43    foreach (const KPlatformArchitecture &enmArch, comSysProps.GetSupportedPlatformArchitectures())
     44    {
     45        CPlatformProperties comPlatProps = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     46        guestOSTypes += comPlatProps.GetSupportedGuestOSTypes();
     47    }
     48
     49    /* Wipe out cache: */
    3850    m_typeIdIndexMap.clear();
    3951    m_guestOSTypes.clear();
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h

    r102281 r102282  
    109109
    110110    /** Re-create the guest OS type database. */
    111     void reCacheGuestOSTypes(const CGuestOSTypeVector &guestOSTypes);
     111    void reCacheGuestOSTypes();
    112112
    113113    /** Returns a list of all families (id and description). */
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