Changeset 91262 in vbox
- Timestamp:
- Sep 15, 2021 7:24:39 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
r91261 r91262 27 27 #include "UINotificationCenter.h" 28 28 #include "UIWizardExportApp.h" 29 #include "UIWizardExportAppDefs.h"30 29 #include "UIWizardExportAppPageBasic1.h" 31 30 #include "UIWizardExportAppPageBasic2.h" … … 72 71 else 73 72 { 74 /* Get export appliance widget & fetch all settings from the appliance editor: */ 75 UIApplianceExportEditorWidget *pExportApplianceWidget = field("applianceWidget").value<ExportAppliancePointer>(); 76 AssertPtrReturn(pExportApplianceWidget, false); 77 pExportApplianceWidget->prepareExport(); 78 79 /* Acquire the appliance: */ 80 CAppliance *pComAppliance = pExportApplianceWidget->appliance(); 81 AssertPtrReturn(pComAppliance, false); 73 /* Get appliance: */ 74 CAppliance comAppliance = field("localAppliance").value<CAppliance>(); 75 AssertReturn(comAppliance.isNotNull(), false); 82 76 83 77 /* We need to know every filename which will be created, so that we can ask the user for confirmation of overwriting. … … 100 94 101 95 /* Add all hard disk images: */ 102 CVirtualSystemDescriptionVector vsds = pComAppliance->GetVirtualSystemDescriptions();96 CVirtualSystemDescriptionVector vsds = comAppliance.GetVirtualSystemDescriptions(); 103 97 for (int i = 0; i < vsds.size(); ++i) 104 98 { … … 113 107 114 108 /* Initialize VFS explorer: */ 115 CVFSExplorer comExplorer = pComAppliance->CreateVFSExplorer(uri(false /* fWithFile */));109 CVFSExplorer comExplorer = comAppliance.CreateVFSExplorer(uri(false /* fWithFile */)); 116 110 if (comExplorer.isNotNull()) 117 111 { … … 130 124 } 131 125 else 132 return msgCenter().cannotCheckFiles( *pComAppliance, this);126 return msgCenter().cannotCheckFiles(comAppliance, this); 133 127 134 128 /* Confirm overwriting for existing files: */ … … 155 149 156 150 /* Export the VMs, on success we are finished: */ 157 return exportVMs( *pComAppliance);151 return exportVMs(comAppliance); 158 152 } 159 153 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
r91261 r91262 40 40 #include "UIVirtualBoxManager.h" 41 41 #include "UIWizardExportApp.h" 42 #include "UIWizardExportAppDefs.h"43 42 #include "UIWizardExportAppPageBasic2.h" 44 43 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
r91259 r91262 23 23 #include "QILabelSeparator.h" 24 24 #include "QIRichTextLabel.h" 25 #include "UIApplianceExportEditorWidget.h" 25 26 #include "UICommon.h" 26 27 #include "UIMessageCenter.h" … … 29 30 30 31 /* COM includes: */ 31 #include "CAppliance.h"32 32 #include "CMachine.h" 33 33 #include "CVirtualSystemDescriptionForm.h" … … 40 40 UIWizardExportAppPage3::UIWizardExportAppPage3() 41 41 : m_pSettingsCntLayout(0) 42 , m_pApplianceWidget(0) 42 43 { 43 44 } … … 98 99 } 99 100 101 CAppliance UIWizardExportAppPage3::localAppliance() const 102 { 103 CAppliance *pAppliance = m_pApplianceWidget->appliance(); 104 return pAppliance ? *pAppliance : CAppliance(); 105 } 106 100 107 101 108 /********************************************************************************************************************************* … … 174 181 } 175 182 176 /* Register classes: */177 qRegisterMetaType<ExportAppliancePointer>();178 179 183 /* Register fields: */ 180 registerField(" applianceWidget", this, "applianceWidget");184 registerField("localAppliance", this, "localAppliance"); 181 185 } 182 186 … … 247 251 } 248 252 } 253 /* Otherwise if there was local target selected: */ 254 else 255 { 256 /* Prepare export: */ 257 m_pApplianceWidget->prepareExport(); 258 } 249 259 250 260 /* Try to export appliance: */ … … 287 297 { 288 298 /* Reset widget to default: */ 289 AssertPtrReturnVoid(m_pApplianceWidget.data());290 299 m_pApplianceWidget->restoreDefaults(); 291 300 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.h
r91259 r91262 29 29 #include "UIExtraDataDefs.h" 30 30 #include "UIFormEditorWidget.h" 31 #include "UIWizardExportAppDefs.h"32 31 #include "UIWizardPage.h" 32 33 /* COM includes: */ 34 #include "CAppliance.h" 33 35 34 36 /* Forward declarations: */ 35 37 class QStackedLayout; 36 38 class QIRichTextLabel; 39 class UIApplianceExportEditorWidget; 37 40 class UIWizardExportApp; 38 41 … … 54 57 void refreshFormPropertiesTable(); 55 58 56 /** Returns the appliance widget reference. */57 ExportAppliancePointer applianceWidget() const { return m_pApplianceWidget; }59 /** Returns Local Appliance object. */ 60 CAppliance localAppliance() const; 58 61 59 62 /** Holds the settings container layout instance. */ … … 61 64 62 65 /** Holds the appliance widget reference. */ 63 ExportAppliancePointerm_pApplianceWidget;66 UIApplianceExportEditorWidget *m_pApplianceWidget; 64 67 /** Holds the Form Editor widget instance. */ 65 UIFormEditorWidgetPointer m_pFormEditor;68 UIFormEditorWidgetPointer m_pFormEditor; 66 69 }; 67 70 … … 71 74 { 72 75 Q_OBJECT; 73 Q_PROPERTY( ExportAppliancePointer applianceWidget READ applianceWidget);76 Q_PROPERTY(CAppliance localAppliance READ localAppliance); 74 77 75 78 public: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r91261 r91262 41 41 #include "UIVirtualBoxManager.h" 42 42 #include "UIWizardExportApp.h" 43 #include "UIWizardExportAppDefs.h"44 43 #include "UIWizardExportAppPageExpert.h" 45 44 … … 423 422 this, &UIWizardExportAppPageExpert::sltHandleProfileButtonClick); 424 423 425 /* Register classes: */426 qRegisterMetaType<ExportAppliancePointer>();427 428 424 /* Register fields: */ 429 425 registerField("machineNames", this, "machineNames"); … … 441 437 registerField("vsdExportForm", this, "vsdExportForm"); 442 438 registerField("cloudExportMode", this, "cloudExportMode"); 443 registerField(" applianceWidget", this, "applianceWidget");439 registerField("localAppliance", this, "localAppliance"); 444 440 } 445 441 … … 634 630 } 635 631 } 632 /* Otherwise if there was local target selected: */ 633 else 634 { 635 /* Prepare export: */ 636 m_pApplianceWidget->prepareExport(); 637 } 636 638 637 639 /* Try to export appliance: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r91261 r91262 51 51 Q_PROPERTY(CVirtualSystemDescriptionForm vsdExportForm READ vsdExportForm); 52 52 Q_PROPERTY(CloudExportMode cloudExportMode READ cloudExportMode); 53 Q_PROPERTY( ExportAppliancePointer applianceWidget READ applianceWidget);53 Q_PROPERTY(CAppliance localAppliance READ localAppliance); 54 54 55 55 public:
Note:
See TracChangeset
for help on using the changeset viewer.