VirtualBox

Changeset 78994 in vbox


Ignore:
Timestamp:
Jun 5, 2019 1:09:44 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9484: Export Appliance wizard: Move cloud export procedure onto own appliance object.

File:
1 edited

Legend:

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

    r77305 r78994  
    5656bool UIWizardExportApp::exportAppliance()
    5757{
    58     /* Get export appliance widget & fetch all settings from the appliance editor: */
    59     UIApplianceExportEditorWidget *pExportApplianceWidget = field("applianceWidget").value<ExportAppliancePointer>();
    60     AssertPtrReturn(pExportApplianceWidget, false);
    61     pExportApplianceWidget->prepareExport();
    62 
    63     /* Acquire the appliance: */
    64     CAppliance *pComAppliance = pExportApplianceWidget->appliance();
    65     AssertPtrReturn(pComAppliance, false);
    66 
    67     /* For Filesystem formats only: */
    68     if (!field("isFormatCloudOne").toBool())
    69     {
     58    /* Check whether there was cloud target selected: */
     59    const bool fIsFormatCloudOne = field("isFormatCloudOne").toBool();
     60    if (fIsFormatCloudOne)
     61    {
     62        /* Get appliance: */
     63        CAppliance comAppliance = field("appliance").value<CAppliance>();
     64
     65        /* Export the VMs, on success we are finished: */
     66        return exportVMs(comAppliance);
     67    }
     68    else
     69    {
     70        /* Get export appliance widget & fetch all settings from the appliance editor: */
     71        UIApplianceExportEditorWidget *pExportApplianceWidget = field("applianceWidget").value<ExportAppliancePointer>();
     72        AssertPtrReturn(pExportApplianceWidget, false);
     73        pExportApplianceWidget->prepareExport();
     74
     75        /* Acquire the appliance: */
     76        CAppliance *pComAppliance = pExportApplianceWidget->appliance();
     77        AssertPtrReturn(pComAppliance, false);
     78
    7079        /* We need to know every filename which will be created, so that we can ask the user for confirmation of overwriting.
    7180         * For that we iterating over all virtual systems & fetch all descriptions of the type HardDiskImage. Also add the
     
    140149                return msgCenter().cannotCheckFiles(comExplorer, this);
    141150        }
    142     }
    143 
    144     /* Export the VMs, on success we are finished: */
    145     return exportVMs(*pComAppliance);
     151
     152        /* Export the VMs, on success we are finished: */
     153        return exportVMs(*pComAppliance);
     154    }
    146155}
    147156
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