VirtualBox

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


Ignore:
Timestamp:
Aug 17, 2018 8:14:49 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9152: Export Appliance wizard: Fixes and improvement for OCI API redesign presented in r124395.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
Files:
5 edited

Legend:

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

    r73634 r73728  
    152152    /* For Cloud Service Providers: */
    153153    if (field("format").toString() == "csp-1.0")
    154         return QString("OCI://%1").arg(field("profileName").toString());
     154        return QString("%1://%2").arg(field("providerShortName").toString(), field("profileName").toString());
    155155    else
    156156    {
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp

    r73716 r73728  
    128128        if (comProvider.isNull())
    129129            continue;
    130         QString strProviderId = comProvider.GetId();
    131         QString strProviderShortName = comProvider.GetShortName();
    132130
    133131        /* Iterate through profile names: */
     
    135133        {
    136134            m_pAccountComboBox->addItem(QString());
    137             m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProviderId, ProviderID);
    138             m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProviderShortName, ProviderName);
     135            m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, comProvider.GetId(), ProviderID);
     136            m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, comProvider.GetName(), ProviderName);
     137            m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, comProvider.GetShortName(), ProviderShortName);
    139138            m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, ProfileName);
    140139        }
     
    154153        return;
    155154
     155    /* Acquire Cloud Profile: */
    156156    m_comCloudProfile = comCloudProvider.GetProfileByName(profileName());
    157157    /* Return if the profile has disappeared: */
    158158    if (m_comCloudProfile.isNull())
     159        return;
    159160
    160161    /* Clear table initially: */
     
    431432    const int iIndex = m_pAccountComboBox->currentIndex();
    432433    return m_pAccountComboBox->itemData(iIndex, ProviderID).toString();
     434}
     435
     436QString UIWizardExportAppPage2::providerShortName() const
     437{
     438    const int iIndex = m_pAccountComboBox->currentIndex();
     439    return m_pAccountComboBox->itemData(iIndex, ProviderShortName).toString();
    433440}
    434441
     
    699706    registerField("manifestSelected", this, "manifestSelected");
    700707    registerField("includeISOsSelected", this, "includeISOsSelected");
     708    registerField("providerShortName", this, "providerShortName");
    701709    registerField("profileName", this, "profileName");
    702     registerField("provider", this, "provider");
     710    registerField("profile", this, "profile");
    703711}
    704712
     
    791799    for (int i = 0; i < m_pAccountComboBox->count(); ++i)
    792800    {
    793         if (m_pAccountComboBox->itemData(i, ProviderID).toString() == "54e11de4-afcc-47fb-9c39-b24244cfa044")
    794         {
    795             m_pAccountComboBox->setItemText(i, UIWizardExportApp::tr("Oracle Cloud Infrastructure: %1", "provider: profile")
    796                 .arg(m_pAccountComboBox->itemData(i, ProfileName).toString()));
    797         }
    798         else
    799         {
    800             m_pAccountComboBox->setItemText(i, UIWizardExportApp::tr("%1: %2", "provider: profile")
    801                 .arg(m_pAccountComboBox->itemData(i, ProviderName).toString())
    802                 .arg(m_pAccountComboBox->itemData(i, ProfileName).toString()));
    803         }
     801        m_pAccountComboBox->setItemText(i, UIWizardExportApp::tr("%1: %2", "provider: profile")
     802            .arg(m_pAccountComboBox->itemData(i, ProviderName).toString())
     803            .arg(m_pAccountComboBox->itemData(i, ProfileName).toString()));
    804804    }
    805805
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h

    r73716 r73728  
    5656enum
    5757{
    58     ProviderID      = Qt::UserRole + 1,
    59     ProviderName    = Qt::UserRole + 2,
    60     ProfileName     = Qt::UserRole + 3
     58    ProviderID        = Qt::UserRole + 1,
     59    ProviderName      = Qt::UserRole + 2,
     60    ProviderShortName = Qt::UserRole + 3,
     61    ProfileName       = Qt::UserRole + 4
    6162};
    6263
     
    131132    /** Returns provider ID. */
    132133    QString providerId() const;
     134    /** Returns provider short name. */
     135    QString providerShortName() const;
    133136    /** Returns profile name. */
    134137    QString profileName() const;
     
    199202    Q_PROPERTY(bool manifestSelected READ isManifestSelected WRITE setManifestSelected);
    200203    Q_PROPERTY(bool includeISOsSelected READ isIncludeISOsSelected WRITE setIncludeISOsSelected);
     204    Q_PROPERTY(QString providerShortName READ providerShortName);
     205    Q_PROPERTY(QString profileName READ profileName);
    201206    Q_PROPERTY(CCloudProfile profile READ profile);
    202     Q_PROPERTY(QString profileName READ profileName);
    203207
    204208public:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp

    r73580 r73728  
    349349    registerField("manifestSelected", this, "manifestSelected");
    350350    registerField("includeISOsSelected", this, "includeISOsSelected");
     351    registerField("providerShortName", this, "providerShortName");
    351352    registerField("profileName", this, "profileName");
    352     registerField("provider", this, "provider");
     353    registerField("profile", this, "profile");
    353354    registerField("applianceWidget", this, "applianceWidget");
    354355}
     
    432433    for (int i = 0; i < m_pAccountComboBox->count(); ++i)
    433434    {
    434         if (m_pAccountComboBox->itemData(i, ProviderID).toString() == "OCI")
    435         {
    436             m_pAccountComboBox->setItemText(i, UIWizardExportApp::tr("Oracle Cloud Infrastructure: %1", "provider: profile")
    437                 .arg(m_pAccountComboBox->itemData(i, ProfileName).toString()));
    438         }
    439         else
    440         {
    441             m_pAccountComboBox->setItemText(i, UIWizardExportApp::tr("%1: %2", "provider: profile")
    442                 .arg(m_pAccountComboBox->itemData(i, ProviderID).toString())
    443                 .arg(m_pAccountComboBox->itemData(i, ProfileName).toString()));
    444         }
     435        m_pAccountComboBox->setItemText(i, UIWizardExportApp::tr("%1: %2", "provider: profile")
     436            .arg(m_pAccountComboBox->itemData(i, ProviderName).toString())
     437            .arg(m_pAccountComboBox->itemData(i, ProfileName).toString()));
    445438    }
    446439
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h

    r73716 r73728  
    4141    Q_PROPERTY(bool manifestSelected READ isManifestSelected WRITE setManifestSelected);
    4242    Q_PROPERTY(bool includeISOsSelected READ isIncludeISOsSelected WRITE setIncludeISOsSelected);
     43    Q_PROPERTY(QString providerShortName READ providerShortName);
     44    Q_PROPERTY(QString profileName READ profileName);
    4345    Q_PROPERTY(CCloudProfile profile READ profile);
    44     Q_PROPERTY(QString profileName READ profileName);
    4546    Q_PROPERTY(ExportAppliancePointer applianceWidget READ applianceWidget);
    4647
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