Changeset 85034 in vbox
- Timestamp:
- Jul 1, 2020 4:33:26 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
r85033 r85034 27 27 #include "UICommon.h" 28 28 #include "UIActionPoolManager.h" 29 #include "UICloudNetworkingStuff.h" 29 30 #include "UIExtraDataManager.h" 30 31 #include "UIIconPool.h" … … 718 719 m_pTreeWidget->clear(); 719 720 720 /* Get VirtualBox for further activities: */ 721 const CVirtualBox comVBox = uiCommon().virtualBox(); 722 723 /* Get CloudProviderManager for further activities: */ 724 const CCloudProviderManager comCloudProviderManager = comVBox.GetCloudProviderManager(); 725 /* Show error message if necessary: */ 726 if (!comVBox.isOk()) 727 msgCenter().cannotAcquireCloudProviderManager(comVBox, this); 728 else 729 { 730 /* Iterate through existing providers: */ 731 foreach (const CCloudProvider &comCloudProvider, comCloudProviderManager.GetProviders()) 721 /* Iterate through existing providers: */ 722 foreach (const CCloudProvider &comCloudProvider, listCloudProviders()) 723 { 724 /* Skip if we have nothing to populate: */ 725 if (comCloudProvider.isNull()) 726 continue; 727 728 /* Load provider data: */ 729 UIDataCloudProvider providerData; 730 loadCloudProvider(comCloudProvider, providerData); 731 createItemForCloudProvider(providerData, false); 732 733 /* Make sure provider item is properly inserted: */ 734 UIItemCloudProvider *pItem = searchItem(providerData.m_uuid); 735 736 /* Iterate through provider's profiles: */ 737 foreach (const CCloudProfile &comCloudProfile, listCloudProfiles(comCloudProvider)) 732 738 { 733 /* Skip if we have nothing to populate (file missing?): */734 if (comCloudPro vider.isNull())739 /* Skip if we have nothing to populate: */ 740 if (comCloudProfile.isNull()) 735 741 continue; 736 742 737 /* Load provider data: */ 738 UIDataCloudProvider providerData; 739 loadCloudProvider(comCloudProvider, providerData); 740 createItemForCloudProvider(providerData, false); 741 742 /* Make sure provider item is properly inserted: */ 743 UIItemCloudProvider *pItem = searchItem(providerData.m_uuid); 744 745 /* Iterate through existing profiles: */ 746 foreach (const CCloudProfile &comCloudProfile, comCloudProvider.GetProfiles()) 747 { 748 /* Load profile data: */ 749 UIDataCloudProfile profileData; 750 loadCloudProfile(comCloudProfile, providerData, profileData); 751 createItemForCloudProfile(pItem, profileData, false); 752 } 753 754 /* Expand provider item finally: */ 755 pItem->setExpanded(true); 743 /* Load profile data: */ 744 UIDataCloudProfile profileData; 745 loadCloudProfile(comCloudProfile, providerData, profileData); 746 createItemForCloudProfile(pItem, profileData, false); 756 747 } 757 748 758 /* Choose the 1st item as current initially: */ 759 m_pTreeWidget->setCurrentItem(m_pTreeWidget->topLevelItem(0)); 760 sltHandleCurrentItemChange(); 761 } 749 /* Expand provider item finally: */ 750 pItem->setExpanded(true); 751 } 752 753 /* Choose the 1st item as current initially: */ 754 m_pTreeWidget->setCurrentItem(m_pTreeWidget->topLevelItem(0)); 755 sltHandleCurrentItemChange(); 762 756 } 763 757
Note:
See TracChangeset
for help on using the changeset viewer.