- Timestamp:
- Apr 15, 2019 5:24:30 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
r78113 r78127 386 386 } 387 387 388 C CloudClient UIWizardImportAppPage1::client() const389 { 390 return m_com CloudClient;388 CVirtualSystemDescriptionForm UIWizardImportAppPage1::vsdForm() const 389 { 390 return m_comVSDForm; 391 391 } 392 392 … … 619 619 registerField("isSourceCloudOne", this, "isSourceCloudOne"); 620 620 registerField("profile", this, "profile"); 621 registerField(" client", this, "client");621 registerField("vsdForm", this, "vsdForm"); 622 622 } 623 623 … … 723 723 bool UIWizardImportAppPageBasic1::validatePage() 724 724 { 725 /* Get import appliance widget: */726 ImportAppliancePointer pImportApplianceWidget = field("applianceWidget").value<ImportAppliancePointer>();727 AssertMsg(!pImportApplianceWidget.isNull(), ("Appliance Widget is not set!\n"));728 729 /* If file name was changed: */730 if (m_pFileSelector->isModified())731 {732 /* Check if set file contains valid appliance: */733 if (!pImportApplianceWidget->setFile(m_pFileSelector->path()))725 if (isSourceCloudOne()) 726 { 727 CVirtualSystemDescriptionForm comForm; 728 CProgress comProgress = m_comCloudClient.GetExportLaunchDescriptionForm(comForm); 729 /* Show error message if necessary: */ 730 if (!m_comCloudClient.isOk()) 731 { 732 /// @todo add real error message 733 //msgCenter().cannotAcquireExportLaunchDescriptionForm(comCloudClient, this); 734 734 return false; 735 /* Reset the modified bit afterwards: */ 736 m_pFileSelector->resetModified(); 737 } 738 739 /* If we have a valid ovf proceed to the appliance settings page: */ 740 return pImportApplianceWidget->isValid(); 735 } 736 else 737 { 738 /* Show "Acquire export form" progress: */ 739 msgCenter().showModalProgressDialog(comProgress, UIWizardImportApp::tr("Acquire export form..."), 740 ":/progress_media_move_90px.png", this); 741 742 /* Show error message if necessary: */ 743 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 744 { 745 /// @todo add real error message 746 //msgCenter().cannotAcquireExportLaunchDescriptionForm(comProgress, this); 747 return false; 748 } 749 else 750 m_comVSDForm = comForm; 751 } 752 return true; 753 } 754 else 755 { 756 /* Get import appliance widget: */ 757 ImportAppliancePointer pImportApplianceWidget = field("applianceWidget").value<ImportAppliancePointer>(); 758 AssertMsg(!pImportApplianceWidget.isNull(), ("Appliance Widget is not set!\n")); 759 760 /* If file name was changed: */ 761 if (m_pFileSelector->isModified()) 762 { 763 /* Check if set file contains valid appliance: */ 764 if (!pImportApplianceWidget->setFile(m_pFileSelector->path())) 765 return false; 766 /* Reset the modified bit afterwards: */ 767 m_pFileSelector->resetModified(); 768 } 769 770 /* If we have a valid ovf proceed to the appliance settings page: */ 771 return pImportApplianceWidget->isValid(); 772 } 741 773 } 742 774 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h
r78113 r78127 32 32 #include "CCloudProvider.h" 33 33 #include "CCloudProviderManager.h" 34 #include "CVirtualSystemDescriptionForm.h" 34 35 35 36 /* Forward declarations: */ … … 98 99 /** Returns Cloud Profile object. */ 99 100 CCloudProfile profile() const; 100 /** Returns Cloud Clientobject. */101 C CloudClient client() const;101 /** Returns Virtual System Description Form object. */ 102 CVirtualSystemDescriptionForm vsdForm() const; 102 103 103 104 /** Holds whether default source should be Import from OCI. */ … … 105 106 106 107 /** Holds the Cloud Provider Manager reference. */ 107 CCloudProviderManager m_comCloudProviderManager;108 CCloudProviderManager m_comCloudProviderManager; 108 109 /** Holds the Cloud Provider object reference. */ 109 CCloudProvider m_comCloudProvider;110 CCloudProvider m_comCloudProvider; 110 111 /** Holds the Cloud Profile object reference. */ 111 CCloudProfile m_comCloudProfile;112 CCloudProfile m_comCloudProfile; 112 113 /** Holds the Cloud Client object reference. */ 113 CCloudClient m_comCloudClient; 114 CCloudClient m_comCloudClient; 115 /** Holds the Virtual System Description Form object reference. */ 116 CVirtualSystemDescriptionForm m_comVSDForm; 114 117 115 118 /** Holds the source layout instance. */ … … 149 152 Q_PROPERTY(bool isSourceCloudOne READ isSourceCloudOne); 150 153 Q_PROPERTY(CCloudProfile profile READ profile); 151 Q_PROPERTY(C CloudClient client READ client);154 Q_PROPERTY(CVirtualSystemDescriptionForm vsdForm READ vsdForm); 152 155 153 156 public:
Note:
See TracChangeset
for help on using the changeset viewer.