VirtualBox

Changeset 105519 in vbox for trunk


Ignore:
Timestamp:
Jul 26, 2024 10:19:58 AM (6 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10543: If one of unsupported OS types chosen by a 3rd parties for particular VM, we have to make sure it's reflected in VM settings as the only possible family/subtype/type as a fallback solution; Fixing corresponding assertion as GUI was going crazy detecting unsupported types.

File:
1 edited

Legend:

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

    r105518 r105519  
    224224                                  KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    225225{
    226     /* Otherwise we'll have to prepare list by arch type: */
     226    /* Prepare family list: */
    227227    UIGuestOSTypeManager::UIGuestOSFamilyInfo families;
    228228    foreach (const UIFamilyInfo &fi, m_guestOSFamilies)
    229229    {
     230        /* Always include family which was asked for: */
     231        if (including.contains(fi.m_strId))
     232        {
     233            families << fi;
     234            continue;
     235        }
     236
     237        /* Skip everyting if requested arch type is NOT supported: */
     238        if (   enmArch != KPlatformArchitecture_None
     239            && !m_supportedArchTypes.contains(enmArch))
     240            continue;
     241
     242        /* Skip unsupported families if there was no request to show all: */
    230243        if (   !fListAll
    231             && !fi.m_fSupported
    232             && !including.contains(fi.m_strId))
    233             continue;
     244            && !fi.m_fSupported)
     245            continue;
     246
    234247        const KPlatformArchitecture enmCurrentArch = fi.m_enmArch;
    235248        if (   enmCurrentArch == enmArch
     
    247260                                             KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const
    248261{
    249     /* Otherwise we'll have to prepare list by arch type: */
     262    /* Prepare subtype list: */
    250263    UIGuestOSSubtypeInfo subtypes;
    251264    foreach (const UISubtypeInfo &si, m_guestOSSubtypes.value(strFamilyId))
    252265    {
     266        /* Always include subtype which was asked for: */
     267        if (including.contains(si.m_strName))
     268        {
     269            subtypes << si;
     270            continue;
     271        }
     272
     273        /* Skip everyting if requested arch type is NOT supported: */
     274        if (   enmArch != KPlatformArchitecture_None
     275            && !m_supportedArchTypes.contains(enmArch))
     276            continue;
     277
     278        /* Skip unsupported subtypes if there was no request to show all: */
    253279        if (   !fListAll
    254             && !si.m_fSupported
    255             && !including.contains(si.m_strName))
    256             continue;
     280            && !si.m_fSupported)
     281            continue;
     282
    257283        const KPlatformArchitecture enmCurrentArch = si.m_enmArch;
    258284        if (   enmCurrentArch == enmArch
     
    275301    foreach (const UIGuestOSType &type, m_guestOSTypes)
    276302    {
    277         if (   !fListAll
    278             && !type.isSupported()
    279             && !including.contains(type.getId()))
    280             continue;
    281         if (type.getFamilyId() != strFamilyId)
    282             continue;
     303        /* Check for redundant type: */
    283304        QPair<QString, QString> info(type.getId(), type.getDescription());
    284305        if (typeInfoList.contains(info))
    285306            continue;
     307
     308        /* Always include subtype which was asked for: */
     309        if (including.contains(type.getId()))
     310        {
     311            typeInfoList << info;
     312            continue;
     313        }
     314
     315        /* Skip unsupported types if there was no request to show all: */
     316        if (   !fListAll
     317            && !type.isSupported())
     318            continue;
     319
     320        /* Skip types of different family: */
     321        if (type.getFamilyId() != strFamilyId)
     322            continue;
     323
    286324        if (   enmArch == KPlatformArchitecture_None
    287325            || type.getPlatformArchitecture() == enmArch)
     
    302340    foreach (const UIGuestOSType &type, m_guestOSTypes)
    303341    {
    304         if (   !fListAll
    305             && !type.isSupported()
    306             && !including.contains(type.getId()))
    307             continue;
    308         if (type.getSubtype() != strSubtype)
    309             continue;
     342        /* Check for redundant type: */
    310343        QPair<QString, QString> info(type.getId(), type.getDescription());
    311344        if (typeInfoList.contains(info))
    312345            continue;
     346
     347        /* Always include subtype which was asked for: */
     348        if (including.contains(type.getId()))
     349        {
     350            typeInfoList << info;
     351            continue;
     352        }
     353
     354        /* Skip unsupported types if there was no request to show all: */
     355        if (   !fListAll
     356            && !type.isSupported())
     357            continue;
     358
     359        /* Skip types of different subtype: */
     360        if (type.getSubtype() != strSubtype)
     361            continue;
     362
    313363        if (   enmArch == KPlatformArchitecture_None
    314364            || type.getPlatformArchitecture() == enmArch)
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