VirtualBox

Changeset 73573 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 8, 2018 4:14:59 PM (6 years ago)
Author:
vboxsync
Message:

bugref:9152. one more file for the previous commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp

    r73349 r73573  
    4242
    4343/* COM includes: */
    44 # include "CCloudUserProfiles.h"
     44# include "CCloudProvider.h"
    4545
    4646#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
     
    7171    /* Init Cloud User-profile Manager: */
    7272    CVirtualBox comVBox = vboxGlobal().virtualBox();
    73     m_comCloudUserProfileManager = comVBox.CreateCloudUserProfileManager();
    74     AssertMsg(comVBox.isOk() && m_comCloudUserProfileManager.isNotNull(),
    75               ("Unable to acquire Cloud User-profile Manager"));
     73    m_comCloudProviderManager = comVBox.CreateCloudProviderManager();
     74    AssertMsg(comVBox.isOk() && m_comCloudProviderManager.isNotNull(),
     75              ("Unable to acquire Cloud Provider Manager"));
    7676}
    7777
     
    118118
    119119    /* Acquire provider ID list: */
    120     QVector<KCloudProviderId> providerIds = m_comCloudUserProfileManager.GetSupportedProviders();
     120//  QVector<KCloudProviderId> providerIds = m_comCloudProviderManager.GetSupportedProviders();
     121    QVector<QString> providerIds = m_comCloudProviderManager.GetSupportedProviders();
    121122    /* Make sure at least one provider is supported: */
    122123    AssertReturnVoid(!providerIds.isEmpty());
    123124
    124125    /* Iterate through provider types: */
    125     foreach (KCloudProviderId enmType, providerIds)
    126     {
    127         /* Acquire Cloud User-profile List: */
    128         CCloudUserProfiles comProfiles = m_comCloudUserProfileManager.GetProfilesByProvider(enmType);
    129         /* Skip if we have nothing to populate (file missing?): */
    130         if (comProfiles.isNull())
    131             continue;
    132 
    133         /* Iterate through profile names: */
    134         foreach (const QString &strProfileName, comProfiles.GetStoredProfilesNames())
    135         {
    136             m_pAccountComboBox->addItem(QString());
    137             m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, (int)enmType, ProviderID);
    138             m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, ProfileName);
    139         }
    140     }
    141 
    142     /* Set default: */
    143     if (m_pAccountComboBox->count() != 0)
    144         setProvider(KCloudProviderId_OCI);
     126//  foreach (KCloudProviderId enmType, providerIds)
     127//  {
     128//      /* Acquire Cloud User-profile List: */
     129//      CCloudUserProfiles comProfiles = m_comCloudProviderManager.GetProfilesByProvider(enmType);
     130//      /* Skip if we have nothing to populate (file missing?): */
     131//      if (comProfiles.isNull())
     132//          continue;
     133//
     134//      /* Iterate through profile names: */
     135//      foreach (const QString &strProfileName, comProfiles.GetStoredProfilesNames())
     136//      {
     137//          m_pAccountComboBox->addItem(QString());
     138//          m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, (int)enmType, ProviderID);
     139//          m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, ProfileName);
     140//      }
     141//  }
     142//
     143//  /* Set default: */
     144//  if (m_pAccountComboBox->count() != 0)
     145//      setProvider(KCloudProviderId_OCI);
    145146}
    146147
     
    148149{
    149150    /* Acquire Cloud User-profile List: */
    150     m_comCloudUserProfiles = m_comCloudUserProfileManager.GetProfilesByProvider(provider());
     151    m_comCloudProvider = m_comCloudProviderManager.GetProfilesByProvider(provider());
    151152    /* Return if we have nothing to populate (file missing?): */
    152     if (m_comCloudUserProfiles.isNull())
     153    if (m_comCloudProvider.isNull())
    153154        return;
    154155
     
    159160    QVector<QString> keys;
    160161    QVector<QString> values;
    161     values = m_comCloudUserProfiles.GetProfileProperties(profile(), keys);
     162    values = m_comCloudProvider.GetProfileProperties(profile(), keys);
    162163
    163164    /* Configure table: */
     
    177178
    178179            /* Use non-translated description as tool-tip: */
    179             const QString strToolTip = m_comCloudUserProfiles.GetPropertyDescription(keys.at(i));
     180            const QString strToolTip = m_comCloudProvider.GetPropertyDescription(keys.at(i));
    180181            pItemK->setData(Qt::UserRole, strToolTip);
    181182
     
    422423}
    423424
    424 KCloudProviderId UIWizardExportAppPage2::provider() const
    425 {
    426     const int iIndex = m_pAccountComboBox->currentIndex();
    427     return (KCloudProviderId)m_pAccountComboBox->itemData(iIndex, ProviderID).toInt();
     425//KCloudProviderId UIWizardExportAppPage2::provider() const
     426//{
     427//  const int iIndex = m_pAccountComboBox->currentIndex();
     428//  return (KCloudProviderId)m_pAccountComboBox->itemData(iIndex, ProviderID).toInt();
     429//}
     430
     431QString UIWizardExportAppPage2::provider() const
     432{
     433    return "OCI";
     434//const int iIndex = m_pAccountComboBox->currentIndex();
     435//return (KCloudProviderId)m_pAccountComboBox->itemData(iIndex, ProviderID).toInt();
    428436}
    429437
     
    434442}
    435443
    436 CCloudUserProfiles UIWizardExportAppPage2::profiles() const
    437 {
    438     return m_comCloudUserProfiles;
     444CCloudProvider UIWizardExportAppPage2::profiles() const
     445{
     446    return m_comCloudProvider;
    439447}
    440448
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