Changeset 103703 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 6, 2024 2:33:12 PM (9 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp
r103689 r103703 109 109 110 110 /* Cache or update subtype info: */ 111 UISubtypeInfo si(strSubtype, enmArch );111 UISubtypeInfo si(strSubtype, enmArch, fSupported); 112 112 if (!m_guestOSSubtypes.contains(strFamilyId)) 113 113 m_guestOSSubtypes[strFamilyId] << si; … … 123 123 if (subtypes.at(iIndex).m_enmArch != enmArch) 124 124 subtypes[iIndex].m_enmArch = KPlatformArchitecture_None; // means any 125 if (subtypes.at(iIndex).m_fSupported != fSupported) 126 subtypes[iIndex].m_fSupported = true; // cause at least one is supported 125 127 } 126 128 } … … 149 151 UIGuestOSTypeManager::UIGuestOSSubtypeInfo 150 152 UIGuestOSTypeManager::getSubtypesForFamilyId(const QString &strFamilyId, 153 bool fListAll, 151 154 KPlatformArchitecture enmArch /* = KPlatformArchitecture_None */) const 152 155 { … … 160 163 { 161 164 const KPlatformArchitecture enmCurrentArch = si.m_enmArch; 162 if (enmCurrentArch == enmArch || enmCurrentArch == KPlatformArchitecture_None) 165 if ( (enmCurrentArch == enmArch || enmCurrentArch == KPlatformArchitecture_None) 166 && (fListAll || si.m_fSupported)) 163 167 subtypes << si; 164 168 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h
r103689 r103703 87 87 UISubtypeInfo() 88 88 : m_enmArch(KPlatformArchitecture_None) 89 , m_fSupported(false) 89 90 {} 90 91 91 92 /** Constructs subtype info. 92 * @param strName Brings the name. 93 * @param enmArch Brings the architecture type. */ 93 * @param strName Brings the name. 94 * @param enmArch Brings the architecture type. 95 * @param fSupported Brings whether subtype is supported. */ 94 96 UISubtypeInfo(const QString &strName, 95 KPlatformArchitecture enmArch) 97 KPlatformArchitecture enmArch, 98 bool fSupported) 96 99 : m_strName(strName) 97 100 , m_enmArch(enmArch) 101 , m_fSupported(fSupported) 98 102 {} 99 103 … … 108 112 /** Holds the architecture. */ 109 113 KPlatformArchitecture m_enmArch; 114 /** Holds whether subtype is supported. */ 115 bool m_fSupported; 110 116 }; 111 117 … … 181 187 void reCacheGuestOSTypes(); 182 188 183 /** Returns a list of all families. */ 189 /** Returns a list of all families. 190 * @param fListAll Brings whether a list of all families is requested, supported otherwise. */ 184 191 UIGuestOSFamilyInfo getFamilies(bool fListAll, 185 192 KPlatformArchitecture enmArch = KPlatformArchitecture_None) const; 186 /** Returns the list of subtypes for @p strFamilyId. This may be an empty list. */ 193 /** Returns the list of subtypes for @p strFamilyId. This may be an empty list. 194 * @param fListAll Brings whether a list of all subtypes is requested, supported otherwise. */ 187 195 UIGuestOSSubtypeInfo getSubtypesForFamilyId(const QString &strFamilyId, 196 bool fListAll, 188 197 KPlatformArchitecture enmArch = KPlatformArchitecture_None) const; 189 198 /** Returns a list of OS types for the @p strFamilyId. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r103688 r103703 653 653 /* Acquire a list of suitable sub-types: */ 654 654 const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions 655 = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, enmArch);655 = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, false, enmArch); 656 656 m_pLabelDistribution->setEnabled(!distributions.isEmpty()); 657 657 m_pComboDistribution->setEnabled(!distributions.isEmpty()); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestOSTypeSelectionButton.cpp
r103688 r103703 108 108 m_pMainMenu->clear(); 109 109 110 const UIGuestOSTypeManager::UIGuestOSFamilyInfo familyies = uiCommon().guestOSTypeManager().getFamilies(true); 110 const UIGuestOSTypeManager::UIGuestOSFamilyInfo families 111 = uiCommon().guestOSTypeManager().getFamilies(true); 111 112 112 for (int i = 0; i < famil yies.size(); ++i)113 for (int i = 0; i < families.size(); ++i) 113 114 { 114 const UIFamilyInfo &fi = famil yies.at(i);115 const UIFamilyInfo &fi = families.at(i); 115 116 QMenu *pSubMenu = m_pMainMenu->addMenu(fi.m_strDescription); 116 const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId); 117 const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions 118 = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId, true); 117 119 118 120 if (distributions.isEmpty())
Note:
See TracChangeset
for help on using the changeset viewer.