Changeset 82973 in vbox
- Timestamp:
- Feb 4, 2020 11:13:12 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r82968 r82973 130 130 $(if $(VBOX_GUI_WITH_KEYS_RESET_HANDLER),VBOX_GUI_WITH_KEYS_RESET_HANDLER) \ 131 131 $(if $(VBOX_GUI_WITH_CUSTOMIZATIONS1),VBOX_GUI_WITH_CUSTOMIZATIONS1) \ 132 $(if $(VBOX_GUI_WITH_CLOUD_VMS),VBOX_GUI_WITH_CLOUD_VMS) \ 132 133 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE) \ 133 134 $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,) -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r82968 r82973 31 31 /* COM includes: */ 32 32 #include "CMachine.h" 33 #ifdef VBOX_GUI_WITH_CLOUD_VMS 34 # include "CCloudProvider.h" 35 # include "CCloudProviderManager.h" 36 #endif 33 37 34 38 /* Type defs: */ … … 326 330 } 327 331 LogRelFlow(("UIChooserModel: VMs loaded.\n")); 332 333 #ifdef VBOX_GUI_WITH_CLOUD_VMS 334 /* Add cloud provider groups: */ 335 LogRelFlow(("UIChooserModel: Loading cloud providers...\n")); 336 /* Acquire VBox: */ 337 CVirtualBox comVBox = uiCommon().virtualBox(); 338 CCloudProviderManager comCloudProviderManager = comVBox.GetCloudProviderManager(); 339 /* Show error message if necessary: */ 340 if (!comVBox.isOk()) 341 msgCenter().cannotAcquireCloudProviderManager(comVBox); 342 else 343 { 344 /* Acquire existing providers: */ 345 const QVector<CCloudProvider> providers = comCloudProviderManager.GetProviders(); 346 /* Show error message if necessary: */ 347 if (!comCloudProviderManager.isOk()) 348 msgCenter().cannotAcquireCloudProviderManagerParameter(comCloudProviderManager); 349 else 350 { 351 /* Iterate through existing providers: */ 352 foreach (const CCloudProvider &comProvider, providers) 353 { 354 /* Skip if we have nothing to populate (file missing?): */ 355 if (comProvider.isNull()) 356 continue; 357 /* Skip if we have nothing to populate (profiles missing?): */ 358 const QVector<QString> profileNames = comProvider.GetProfileNames(); 359 if (profileNames.isEmpty()) 360 continue; 361 362 /* Get provider name: */ 363 const QString strProviderName = comProvider.GetShortName(); 364 365 /* If we have at least one profile we can add provider group node: */ 366 UIChooserNodeGroup *pProviderNode = 367 new UIChooserNodeGroup(m_pInvisibleRootNode, 368 false /* favorite */, 369 getDesiredNodePosition(m_pInvisibleRootNode, UIChooserItemType_Group, strProviderName), 370 strProviderName, 371 true /* opened */); 372 373 /* Show error message if necessary: */ 374 if (!comProvider.isOk()) 375 msgCenter().cannotAcquireCloudProviderParameter(comProvider); 376 else 377 { 378 /* Iterate through existing profile names: */ 379 foreach (const QString &strProfileName, profileNames) 380 { 381 /* Skip if we have nothing to show (wtf happened?): */ 382 if (strProfileName.isEmpty()) 383 continue; 384 385 /* If we have at least one profile we can add provider group node: */ 386 UIChooserNodeGroup *pProfileNode = 387 new UIChooserNodeGroup(pProviderNode, 388 false /* favorite */, 389 getDesiredNodePosition(pProviderNode, UIChooserItemType_Group, strProfileName), 390 strProfileName, 391 true /* opened */); 392 new UIChooserNodeMachine(pProfileNode, 393 false /* favorite */, 394 0 /* position */); 395 } 396 } 397 } 398 } 399 } 400 LogRelFlow(("UIChooserModel: Cloud providers loaded.\n")); 401 #endif /* VBOX_GUI_WITH_CLOUD_VMS */ 328 402 } 329 403 }
Note:
See TracChangeset
for help on using the changeset viewer.