Changeset 102848 in vbox
- Timestamp:
- Jan 11, 2024 4:10:41 PM (11 months ago)
- 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 143 143 /** @name Cloud update stuff. 144 144 * @{ */ 145 /** Returns whether real cloud nodes should be kept updated. */ 146 bool isKeepCloudNodesUpdated() const { return m_fKeepCloudNodesUpdated; } 145 147 /** Defines whether real cloud nodes should be kept updated. */ 146 148 void setKeepCloudNodesUpdated(bool fUpdate); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r102575 r102848 1352 1352 void UIChooserModel::sltUpdateSelectedCloudProfiles() 1353 1353 { 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 1354 1377 /* For every selected item: */ 1355 1378 QSet<UICloudEntityKey> selectedCloudProfileKeys; 1356 foreach (UIChooserItem *pSelectedItem, selectedItems())1379 foreach (UIChooserItem *pSelectedItem, itemsToUpdate) 1357 1380 { 1358 1381 /* Enumerate cloud profile keys to update: */
Note:
See TracChangeset
for help on using the changeset viewer.