VirtualBox

Ignore:
Timestamp:
May 29, 2019 1:38:42 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9434: Import Appliance wizard: 1st page: Expose appliance щиоусе used for cloud operations as a wizard field to be able to use it on other pages and in import operation.

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

    r78849 r78850  
    3939
    4040/* COM includes: */
    41 #include "CAppliance.h"
    4241#include "CStringArray.h"
    4342
     
    329328void UIWizardImportAppPage1::populateFormProperties()
    330329{
     330    /* Clear appliance: */
     331    m_comAppliance = CAppliance();
    331332    /* Clear form properties: */
    332333    m_comVSDForm = CVirtualSystemDescriptionForm();
     
    348349            }
    349350
     351            /* Remember appliance: */
     352            m_comAppliance = comAppliance;
     353
    350354            /* Read cloud instance info: */
    351             CProgress comReadProgress = comAppliance.Read(QString("OCI://%1/%2").arg(profileName(), machineId()));
    352             if (!comAppliance.isOk())
    353             {
    354                 msgCenter().cannotImportAppliance(comAppliance);
     355            CProgress comReadProgress = m_comAppliance.Read(QString("OCI://%1/%2").arg(profileName(), machineId()));
     356            if (!m_comAppliance.isOk())
     357            {
     358                msgCenter().cannotImportAppliance(m_comAppliance);
    355359                break;
    356360            }
     
    361365            if (!comReadProgress.isOk() || comReadProgress.GetResultCode() != 0)
    362366            {
    363                 msgCenter().cannotImportAppliance(comReadProgress, comAppliance.GetPath());
     367                msgCenter().cannotImportAppliance(comReadProgress, m_comAppliance.GetPath());
    364368                break;
    365369            }
    366370
    367371            /* Interpret cloud instance info: */
    368             comAppliance.Interpret();
    369             if (!comAppliance.isOk())
    370             {
    371                 msgCenter().cannotImportAppliance(comAppliance);
     372            m_comAppliance.Interpret();
     373            if (!m_comAppliance.isOk())
     374            {
     375                msgCenter().cannotImportAppliance(m_comAppliance);
    372376                break;
    373377            }
    374378
    375379            /* Create virtual system description: */
    376             comAppliance.CreateVirtualSystemDescriptions(1);
    377             if (!comAppliance.isOk())
    378             {
    379                 msgCenter().cannotCreateVirtualSystemDescription(comAppliance);
     380            m_comAppliance.CreateVirtualSystemDescriptions(1);
     381            if (!m_comAppliance.isOk())
     382            {
     383                msgCenter().cannotCreateVirtualSystemDescription(m_comAppliance);
    380384                break;
    381385            }
    382386
    383387            /* Acquire virtual system description: */
    384             QVector<CVirtualSystemDescription> descriptions = comAppliance.GetVirtualSystemDescriptions();
    385             if (!comAppliance.isOk())
    386             {
    387                 msgCenter().cannotAcquireVirtualSystemDescription(comAppliance);
     388            QVector<CVirtualSystemDescription> descriptions = m_comAppliance.GetVirtualSystemDescriptions();
     389            if (!m_comAppliance.isOk())
     390            {
     391                msgCenter().cannotAcquireVirtualSystemDescription(m_comAppliance);
    388392                break;
    389393            }
     
    522526{
    523527    return m_comCloudProfile;
     528}
     529
     530CAppliance UIWizardImportAppPage1::appliance() const
     531{
     532    return m_comAppliance;
    524533}
    525534
     
    772781    registerField("isSourceCloudOne", this, "isSourceCloudOne");
    773782    registerField("profile", this, "profile");
     783    registerField("appliance", this, "appliance");
    774784    registerField("vsdForm", this, "vsdForm");
    775785    registerField("machineId", this, "machineId");
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h

    r78273 r78850  
    2828/* COM includes: */
    2929#include "COMEnums.h"
     30#include "CAppliance.h"
    3031#include "CCloudClient.h"
    3132#include "CCloudProfile.h"
     
    103104    /** Returns Cloud Profile object. */
    104105    CCloudProfile profile() const;
     106    /** Returns Appliance object. */
     107    CAppliance appliance() const;
    105108    /** Returns Virtual System Description Form object. */
    106109    CVirtualSystemDescriptionForm vsdForm() const;
     
    117120    /** Holds the Cloud Client object reference. */
    118121    CCloudClient                   m_comCloudClient;
     122    /** Holds the Appliance object reference. */
     123    CAppliance                     m_comAppliance;
    119124    /** Holds the Virtual System Description Form object reference. */
    120125    CVirtualSystemDescriptionForm  m_comVSDForm;
     
    160165    Q_PROPERTY(bool isSourceCloudOne READ isSourceCloudOne);
    161166    Q_PROPERTY(CCloudProfile profile READ profile);
     167    Q_PROPERTY(CAppliance appliance READ appliance);
    162168    Q_PROPERTY(CVirtualSystemDescriptionForm vsdForm READ vsdForm);
    163169    Q_PROPERTY(QString machineId READ machineId);
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