Changeset 73178 in vbox
- Timestamp:
- Jul 17, 2018 1:46:57 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp
r73130 r73178 213 213 214 214 /* Acquire family ID: */ 215 const QStringstrFamilyId = m_pComboFamily->itemData(iIndex, TypeID).toString();215 m_strFamilyId = m_pComboFamily->itemData(iIndex, TypeID).toString(); 216 216 217 217 /* Populate combo-box with OS types related to currently selected family id: */ 218 foreach (const UIGuestOSType &guiType, m_types.value( strFamilyId))218 foreach (const UIGuestOSType &guiType, m_types.value(m_strFamilyId)) 219 219 { 220 220 /* Skip 64bit OS types if hardware virtualization or long mode is not supported: */ … … 227 227 228 228 /* Select the most recently chosen item: */ 229 if (m_currentIds.contains( strFamilyId))230 { 231 const QString strTypeId = m_currentIds.value( strFamilyId);229 if (m_currentIds.contains(m_strFamilyId)) 230 { 231 const QString strTypeId = m_currentIds.value(m_strFamilyId); 232 232 const int iTypeIndex = m_pComboType->findData(strTypeId, TypeID); 233 233 if (iTypeIndex != -1) … … 235 235 } 236 236 /* Or select Windows 7 item for Windows family as default: */ 237 else if ( strFamilyId == "Windows")237 else if (m_strFamilyId == "Windows") 238 238 { 239 239 QString strDefaultID = "Windows7"; … … 245 245 } 246 246 /* Or select Oracle Linux item for Linux family as default: */ 247 else if ( strFamilyId == "Linux")247 else if (m_strFamilyId == "Linux") 248 248 { 249 249 QString strDefaultID = "Oracle"; … … 268 268 { 269 269 /* Acquire type/family IDs: */ 270 const QString strTypeId = m_pComboType->itemData(iIndex, TypeID).toString(); 271 const QString strFamilyId = m_pComboFamily->itemData(m_pComboFamily->currentIndex(), TypeID).toString(); 270 m_strTypeId = m_pComboType->itemData(iIndex, TypeID).toString(); 272 271 273 272 /* Update selected type pixmap: */ 274 m_pIconType->setPixmap(vboxGlobal().vmGuestOSTypePixmapDefault( strTypeId));273 m_pIconType->setPixmap(vboxGlobal().vmGuestOSTypePixmapDefault(m_strTypeId)); 275 274 276 275 /* Save the most recently used item: */ 277 m_currentIds[ strFamilyId] =strTypeId;276 m_currentIds[m_strFamilyId] = m_strTypeId; 278 277 279 278 /* Notifies listeners about OS type change: */
Note:
See TracChangeset
for help on using the changeset viewer.

