Changeset 103870 in vbox
- Timestamp:
- Mar 15, 2024 3:53:33 PM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 162241
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp
r103868 r103870 81 81 void UIGuestOSTypeManager::addGuestOSType(const CGuestOSType &comType) 82 82 { 83 /* Acquire guest OS type ID and whether it's supported: */ 84 const QString strId = comType.GetId(); 85 const bool fSupported = m_supportedGuestOSTypeIDs.contains(strId); 86 83 87 /* Append guest OS type to a list of cached wrappers: */ 84 m_guestOSTypes.append(UIGuestOSType(comType ));88 m_guestOSTypes.append(UIGuestOSType(comType, fSupported)); 85 89 86 90 /* Acquire a bit of attributes: */ 87 const QString strId = m_guestOSTypes.last().getId();88 91 const QString strFamilyId = m_guestOSTypes.last().getFamilyId(); 89 92 const QString strFamilyDesc = m_guestOSTypes.last().getFamilyDescription(); 90 93 const QString strSubtype = m_guestOSTypes.last().getSubtype(); 91 94 const KPlatformArchitecture enmArch = m_guestOSTypes.last().getPlatformArchitecture(); 92 const bool fSupported = m_supportedGuestOSTypeIDs.contains(strId);93 95 94 96 /* Remember guest OS type index as well: */ … … 312 314 313 315 UIGuestOSType::UIGuestOSType() 314 { 315 } 316 317 UIGuestOSType::UIGuestOSType(const CGuestOSType &comGuestOSType) 316 : m_fSupported(false) 317 { 318 } 319 320 UIGuestOSType::UIGuestOSType(const CGuestOSType &comGuestOSType, bool fSupported) 318 321 : m_comGuestOSType(comGuestOSType) 322 , m_fSupported(fSupported) 319 323 { 320 324 } … … 323 327 { 324 328 return (!m_comGuestOSType.isNull() && m_comGuestOSType.isOk()); 329 } 330 331 bool UIGuestOSType::isSupported() const 332 { 333 return m_fSupported; 325 334 } 326 335 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h
r103803 r103870 121 121 public: 122 122 123 UIGuestOSType(const CGuestOSType &comGuestOSType );123 UIGuestOSType(const CGuestOSType &comGuestOSType, bool fSupported); 124 124 UIGuestOSType(); 125 126 bool isSupported() const; 125 127 126 128 const QString &getFamilyId() const; … … 149 151 private: 150 152 153 CGuestOSType m_comGuestOSType; 154 155 bool m_fSupported; 156 151 157 /** @name CGuestOSType properties. Cached here for a faster access. 152 158 * @{ */ … … 157 163 mutable QString m_strDescription; 158 164 /** @} */ 159 160 CGuestOSType m_comGuestOSType;161 165 }; 162 166
Note:
See TracChangeset
for help on using the changeset viewer.