Changeset 73728 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 17, 2018 8:14:49 AM (6 years ago)
- 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 152 152 /* For Cloud Service Providers: */ 153 153 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()); 155 155 else 156 156 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
r73716 r73728 128 128 if (comProvider.isNull()) 129 129 continue; 130 QString strProviderId = comProvider.GetId();131 QString strProviderShortName = comProvider.GetShortName();132 130 133 131 /* Iterate through profile names: */ … … 135 133 { 136 134 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); 139 138 m_pAccountComboBox->setItemData(m_pAccountComboBox->count() - 1, strProfileName, ProfileName); 140 139 } … … 154 153 return; 155 154 155 /* Acquire Cloud Profile: */ 156 156 m_comCloudProfile = comCloudProvider.GetProfileByName(profileName()); 157 157 /* Return if the profile has disappeared: */ 158 158 if (m_comCloudProfile.isNull()) 159 return; 159 160 160 161 /* Clear table initially: */ … … 431 432 const int iIndex = m_pAccountComboBox->currentIndex(); 432 433 return m_pAccountComboBox->itemData(iIndex, ProviderID).toString(); 434 } 435 436 QString UIWizardExportAppPage2::providerShortName() const 437 { 438 const int iIndex = m_pAccountComboBox->currentIndex(); 439 return m_pAccountComboBox->itemData(iIndex, ProviderShortName).toString(); 433 440 } 434 441 … … 699 706 registerField("manifestSelected", this, "manifestSelected"); 700 707 registerField("includeISOsSelected", this, "includeISOsSelected"); 708 registerField("providerShortName", this, "providerShortName"); 701 709 registerField("profileName", this, "profileName"); 702 registerField("pro vider", this, "provider");710 registerField("profile", this, "profile"); 703 711 } 704 712 … … 791 799 for (int i = 0; i < m_pAccountComboBox->count(); ++i) 792 800 { 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())); 804 804 } 805 805 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.h
r73716 r73728 56 56 enum 57 57 { 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 61 62 }; 62 63 … … 131 132 /** Returns provider ID. */ 132 133 QString providerId() const; 134 /** Returns provider short name. */ 135 QString providerShortName() const; 133 136 /** Returns profile name. */ 134 137 QString profileName() const; … … 199 202 Q_PROPERTY(bool manifestSelected READ isManifestSelected WRITE setManifestSelected); 200 203 Q_PROPERTY(bool includeISOsSelected READ isIncludeISOsSelected WRITE setIncludeISOsSelected); 204 Q_PROPERTY(QString providerShortName READ providerShortName); 205 Q_PROPERTY(QString profileName READ profileName); 201 206 Q_PROPERTY(CCloudProfile profile READ profile); 202 Q_PROPERTY(QString profileName READ profileName);203 207 204 208 public: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r73580 r73728 349 349 registerField("manifestSelected", this, "manifestSelected"); 350 350 registerField("includeISOsSelected", this, "includeISOsSelected"); 351 registerField("providerShortName", this, "providerShortName"); 351 352 registerField("profileName", this, "profileName"); 352 registerField("pro vider", this, "provider");353 registerField("profile", this, "profile"); 353 354 registerField("applianceWidget", this, "applianceWidget"); 354 355 } … … 432 433 for (int i = 0; i < m_pAccountComboBox->count(); ++i) 433 434 { 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())); 445 438 } 446 439 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r73716 r73728 41 41 Q_PROPERTY(bool manifestSelected READ isManifestSelected WRITE setManifestSelected); 42 42 Q_PROPERTY(bool includeISOsSelected READ isIncludeISOsSelected WRITE setIncludeISOsSelected); 43 Q_PROPERTY(QString providerShortName READ providerShortName); 44 Q_PROPERTY(QString profileName READ profileName); 43 45 Q_PROPERTY(CCloudProfile profile READ profile); 44 Q_PROPERTY(QString profileName READ profileName);45 46 Q_PROPERTY(ExportAppliancePointer applianceWidget READ applianceWidget); 46 47
Note:
See TracChangeset
for help on using the changeset viewer.