VirtualBox

Changeset 83130 in vbox for trunk


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

FE/Qt: bugref:9653: VirtualBox Manager: Split cloud VM item updateInfo to sub-steps.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp

    r83129 r83130  
    329329void UIVirtualMachineItemCloud::updateInfo(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)
    330330{
     331    /* Update info: */
     332    updateState(infoMap.value(KVirtualSystemDescriptionType_CloudInstanceState));
     333
     334    /* Recache: */
     335    recache();
     336
     337    /* Notify listeners finally: */
     338    emit sigStateChange();
     339}
     340
     341void UIVirtualMachineItemCloud::updateState(const QString &strInfo)
     342{
    331343    /* Prepare a map of known states: */
    332344    QMap<QString, KMachineState> states;
     
    336348    states["STARTING"] = KMachineState_Starting;
    337349
    338     /* Update our state value: */
    339     m_enmMachineState = states.value(infoMap.value(KVirtualSystemDescriptionType_CloudInstanceState), KMachineState_PoweredOff);
    340 
    341     /* Recache: */
    342     recache();
    343 
    344     /* Notify listeners finally: */
    345     emit sigStateChange();
    346 }
     350    /* Update state value: */
     351    m_enmMachineState = states.value(strInfo, KMachineState_PoweredOff);
     352}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h

    r83129 r83130  
    129129    /** @name Data attributes.
    130130      * @{ */
    131         /** Updates cloud VM info on the basis of string @a infoMap value. */
     131        /** Updates cloud VM info on the basis of @a infoMap value. */
    132132        void updateInfo(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);
     133
     134        /** Updates cloud VM state on the basis of @a strInfo value. */
     135        void updateState(const QString &strInfo);
    133136    /** @} */
    134137
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