- Timestamp:
- Feb 21, 2020 12:14:35 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r83130 r83131 135 135 136 136 /* Determine own VM attributes: */ 137 m_strOSTypeId = "Other"; 137 if ( itemType() == ItemType_CloudFake 138 || m_strOSTypeId.isNull()) 139 m_strOSTypeId = "Other"; 138 140 139 141 /* Determine VM states: */ … … 330 332 { 331 333 /* Update info: */ 334 updateOsType(infoMap.value(KVirtualSystemDescriptionType_OS)); 332 335 updateState(infoMap.value(KVirtualSystemDescriptionType_CloudInstanceState)); 333 336 … … 337 340 /* Notify listeners finally: */ 338 341 emit sigStateChange(); 342 } 343 344 void UIVirtualMachineItemCloud::updateOsType(const QString &strInfo) 345 { 346 /* Prepare a map of known OS types: */ 347 QMap<QString, QString> osTypes; 348 osTypes["Custom"] = QString("Other"); 349 osTypes["Oracle Linux"] = QString("Oracle_64"); 350 osTypes["Canonical Ubuntu"] = QString("Ubuntu_64"); 351 352 /* Update OS type value: */ 353 m_strOSTypeId = osTypes.value(strInfo, "Other"); 339 354 } 340 355 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h
r83130 r83131 132 132 void updateInfo(const QMap<KVirtualSystemDescriptionType, QString> &infoMap); 133 133 134 /** Updates cloud VM OS type on the basis of @a strInfo value. */ 135 void updateOsType(const QString &strInfo); 134 136 /** Updates cloud VM state on the basis of @a strInfo value. */ 135 137 void updateState(const QString &strInfo);
Note:
See TracChangeset
for help on using the changeset viewer.