VirtualBox

Changeset 83131 in vbox for trunk


Ignore:
Timestamp:
Feb 21, 2020 12:14:35 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Extend cloud VM item updateInfo with updateOsType step.

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  
    135135
    136136        /* Determine own VM attributes: */
    137         m_strOSTypeId = "Other";
     137        if (   itemType() == ItemType_CloudFake
     138            || m_strOSTypeId.isNull())
     139            m_strOSTypeId = "Other";
    138140
    139141        /* Determine VM states: */
     
    330332{
    331333    /* Update info: */
     334    updateOsType(infoMap.value(KVirtualSystemDescriptionType_OS));
    332335    updateState(infoMap.value(KVirtualSystemDescriptionType_CloudInstanceState));
    333336
     
    337340    /* Notify listeners finally: */
    338341    emit sigStateChange();
     342}
     343
     344void 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");
    339354}
    340355
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h

    r83130 r83131  
    132132        void updateInfo(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);
    133133
     134        /** Updates cloud VM OS type on the basis of @a strInfo value. */
     135        void updateOsType(const QString &strInfo);
    134136        /** Updates cloud VM state on the basis of @a strInfo value. */
    135137        void updateState(const QString &strInfo);
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