VirtualBox

Changeset 102848 in vbox


Ignore:
Timestamp:
Jan 11, 2024 4:10:41 PM (11 months ago)
Author:
vboxsync
Message:

FE/Qt: VBox Manager: Make sure all cloud profiles are unconditionally updated when Activity Overview Global tool is selected; This is the extension of the logic added in r161037.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h

    r102838 r102848  
    143143    /** @name Cloud update stuff.
    144144      * @{ */
     145        /** Returns whether real cloud nodes should be kept updated. */
     146        bool isKeepCloudNodesUpdated() const { return m_fKeepCloudNodesUpdated; }
    145147        /** Defines whether real cloud nodes should be kept updated. */
    146148        void setKeepCloudNodesUpdated(bool fUpdate);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r102575 r102848  
    13521352void UIChooserModel::sltUpdateSelectedCloudProfiles()
    13531353{
     1354    /* Compose a list of items to update: */
     1355    QList<UIChooserItem*> itemsToUpdate;
     1356
     1357    /* For the case if requested - just update everything: */
     1358    if (isKeepCloudNodesUpdated())
     1359    {
     1360        /* Search for a list of provider nodes having items: */
     1361        QList<UIChooserNode*> providerNodes;
     1362        invisibleRoot()->searchForNodes(QString(),
     1363                                        UIChooserItemSearchFlag_CloudProvider,
     1364                                        providerNodes);
     1365        foreach (UIChooserNode *pNode, providerNodes)
     1366            if (UIChooserItem *pItem = pNode->item())
     1367                itemsToUpdate << pItem;
     1368
     1369        /* Have at least something as a fallback: */
     1370        if (itemsToUpdate.isEmpty())
     1371            itemsToUpdate << selectedItems();
     1372    }
     1373    /* Otherwise update selected items only: */
     1374    else
     1375        itemsToUpdate << selectedItems();
     1376
    13541377    /* For every selected item: */
    13551378    QSet<UICloudEntityKey> selectedCloudProfileKeys;
    1356     foreach (UIChooserItem *pSelectedItem, selectedItems())
     1379    foreach (UIChooserItem *pSelectedItem, itemsToUpdate)
    13571380    {
    13581381        /* Enumerate cloud profile keys to update: */
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