Changeset 86250 in vbox
- Timestamp:
- Sep 23, 2020 5:13:30 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
r86242 r86250 308 308 if (comCloudProfile.isOk()) 309 309 { 310 /* Acquire cloud profile manager restrictions: */ 311 const QStringList restrictions = gEDataManager->cloudProfileManagerRestrictions(); 312 310 313 /* Update profile in the tree: */ 311 314 UIDataCloudProfile data; 312 loadCloudProfile(comCloudProfile, *pProviderItem, data);315 loadCloudProfile(comCloudProfile, restrictions, *pProviderItem, data); 313 316 updateItemForCloudProfile(data, true, pProfileItem); 314 317 … … 395 398 else 396 399 { 400 /* Acquire cloud profile manager restrictions: */ 401 const QStringList restrictions = gEDataManager->cloudProfileManagerRestrictions(); 402 397 403 /* Add profile to the tree: */ 398 404 UIDataCloudProfile data; 399 loadCloudProfile(comCloudProfile, *pProviderItem, data);405 loadCloudProfile(comCloudProfile, restrictions, *pProviderItem, data); 400 406 createItemForCloudProfile(pProviderItem, data, true); 401 407 … … 823 829 /* Load provider data: */ 824 830 UIDataCloudProvider providerData; 825 loadCloudProvider(comCloudProvider, providerData); 826 const QString strProviderPath = QString("/%1").arg(providerData.m_strShortName); 827 providerData.m_fRestricted = restrictions.contains(strProviderPath); 831 loadCloudProvider(comCloudProvider, restrictions, providerData); 828 832 createItemForCloudProvider(providerData, false); 829 833 … … 840 844 /* Load profile data: */ 841 845 UIDataCloudProfile profileData; 842 loadCloudProfile(comCloudProfile, providerData, profileData); 843 const QString strProfilePath = QString("/%1/%2").arg(providerData.m_strShortName).arg(profileData.m_strName); 844 profileData.m_fRestricted = restrictions.contains(strProfilePath); 846 loadCloudProfile(comCloudProfile, restrictions, providerData, profileData); 845 847 createItemForCloudProfile(pItem, profileData, false); 846 848 } … … 856 858 857 859 void UICloudProfileManagerWidget::loadCloudProvider(const CCloudProvider &comProvider, 860 const QStringList &restrictions, 858 861 UIDataCloudProvider &providerData) 859 862 { … … 865 868 if (comProvider.isOk()) 866 869 providerData.m_strName = comProvider.GetName(); 870 const QString strProviderPath = QString("/%1").arg(providerData.m_strShortName); 871 providerData.m_fRestricted = restrictions.contains(strProviderPath); 867 872 foreach (const QString &strSupportedPropertyName, comProvider.GetSupportedPropertyNames()) 868 873 providerData.m_propertyDescriptions[strSupportedPropertyName] = comProvider.GetPropertyDescription(strSupportedPropertyName); … … 874 879 875 880 void UICloudProfileManagerWidget::loadCloudProfile(const CCloudProfile &comProfile, 881 const QStringList &restrictions, 876 882 const UIDataCloudProvider &providerData, 877 883 UIDataCloudProfile &profileData) … … 883 889 if (comProfile.isOk()) 884 890 profileData.m_strName = comProfile.GetName(); 891 const QString strProfilePath = QString("/%1/%2").arg(providerData.m_strShortName).arg(profileData.m_strName); 892 profileData.m_fRestricted = restrictions.contains(strProfilePath); 885 893 886 894 if (comProfile.isOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.h
r86242 r86250 153 153 /** Loads cloud stuff. */ 154 154 void loadCloudStuff(); 155 /** Loads cloud @a comProvider data to passed @a providerData container. */ 155 /** Loads cloud @a comProvider data to passed @a providerData container, 156 * using @a restrictions as hint. */ 156 157 void loadCloudProvider(const CCloudProvider &comProvider, 158 const QStringList &restrictions, 157 159 UIDataCloudProvider &providerData); 158 /** Loads cloud @a comProfile data to passed @a profileData container, using @a providerData as hint. */ 160 /** Loads cloud @a comProfile data to passed @a profileData container, 161 * using @a restrictions & @a providerData as hint. */ 159 162 void loadCloudProfile(const CCloudProfile &comProfile, 163 const QStringList &restrictions, 160 164 const UIDataCloudProvider &providerData, 161 165 UIDataCloudProfile &profileData);
Note:
See TracChangeset
for help on using the changeset viewer.