VirtualBox

Changeset 78113 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 11, 2019 4:03:18 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
129980
Message:

FE/Qt: bugref:9434: Import Appliance wizard: 1st basic page: Pass cloud client through as wizard field, it will be used on 2nd page.

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

    r78094 r78113  
    3737#include "UIWizardImportAppPageBasic1.h"
    3838#include "UIWizardImportAppPageBasic2.h"
    39 
    40 /* COM includes: */
    41 #include "CCloudClient.h"
    4239
    4340
     
    268265    /* Clear list initially: */
    269266    m_pAccountInstanceList->clear();
     267    /* Clear Cloud Client: */
     268    m_comCloudClient = CCloudClient();
    270269
    271270    /* If profile chosen: */
    272271    if (!m_comCloudProfile.isNull())
    273272    {
    274         /* Create Cloud Client: */
    275         CCloudClient comCloudClient = m_comCloudProfile.CreateCloudClient();
     273        /* Acquire Cloud Client: */
     274        m_comCloudClient = m_comCloudProfile.CreateCloudClient();
    276275        /* Show error message if necessary: */
    277276        if (!m_comCloudProfile.isOk())
     
    282281            QVector<QString> vmNames;
    283282            /*const QVector<QString> vmIDs =*/
    284             comCloudClient.ListInstances(KCloudMachineState_Running, vmNames);
     283            m_comCloudClient.ListInstances(KCloudMachineState_Running, vmNames);
    285284            /* Show error message if necessary: */
    286             if (!comCloudClient.isOk())
    287                 msgCenter().cannotAcquireCloudClientParameter(comCloudClient);
     285            if (!m_comCloudClient.isOk())
     286                msgCenter().cannotAcquireCloudClientParameter(m_comCloudClient);
    288287            else
    289288            {
     
    385384{
    386385    return m_comCloudProfile;
     386}
     387
     388CCloudClient UIWizardImportAppPage1::client() const
     389{
     390    return m_comCloudClient;
    387391}
    388392
     
    615619    registerField("isSourceCloudOne", this, "isSourceCloudOne");
    616620    registerField("profile", this, "profile");
     621    registerField("client", this, "client");
    617622}
    618623
     
    709714                      && QFile::exists(m_pFileSelector->path()))
    710715                  || (   fCSP
    711                       && !m_comCloudProfile.isNull());
     716                      && !m_comCloudProfile.isNull()
     717                      && !m_comCloudClient.isNull());
    712718    }
    713719
     
    753759    populateAccountProperties();
    754760    populateAccountInstances();
     761    emit completeChanged();
    755762}
    756763
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h

    r78094 r78113  
    2828/* COM includes: */
    2929#include "COMEnums.h"
     30#include "CCloudClient.h"
    3031#include "CCloudProfile.h"
    3132#include "CCloudProvider.h"
     
    9798    /** Returns Cloud Profile object. */
    9899    CCloudProfile profile() const;
     100    /** Returns Cloud Client object. */
     101    CCloudClient client() const;
    99102
    100103    /** Holds whether default source should be Import from OCI. */
     
    107110    /** Holds the Cloud Profile object reference. */
    108111    CCloudProfile          m_comCloudProfile;
     112    /** Holds the Cloud Client object reference. */
     113    CCloudClient           m_comCloudClient;
    109114
    110115    /** Holds the source layout instance. */
     
    144149    Q_PROPERTY(bool isSourceCloudOne READ isSourceCloudOne);
    145150    Q_PROPERTY(CCloudProfile profile READ profile);
     151    Q_PROPERTY(CCloudClient client READ client);
    146152
    147153public:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette