VirtualBox

Changeset 78273 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 24, 2019 2:34:22 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9434: Import Appliance wizard: 1st basic page: Move form properties acquiring code to separate method, to be reused from the expert wizard 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

    r78218 r78273  
    326326}
    327327
     328void UIWizardImportAppPage1::populateFormProperties()
     329{
     330    /* Clear form properties: */
     331    m_comVSDForm = CVirtualSystemDescriptionForm();
     332
     333    /* If client created: */
     334    if (!m_comCloudClient.isNull())
     335    {
     336        /* Read Cloud Client description form: */
     337        CVirtualSystemDescriptionForm comForm;
     338        CProgress comProgress = m_comCloudClient.GetExportLaunchDescriptionForm(comForm);
     339
     340        /* Show error message if necessary: */
     341        if (!m_comCloudClient.isOk())
     342            msgCenter().cannotAcquireCloudClientParameter(m_comCloudClient);
     343        else
     344        {
     345            /* Show "Acquire export form" progress: */
     346            msgCenter().showModalProgressDialog(comProgress,
     347                                                UIWizardImportApp::tr("Acquire export form..."),
     348                                                ":/progress_reading_appliance_90px.png",
     349                                                0, 0);
     350
     351            /* Show error message if necessary: */
     352            if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
     353                msgCenter().cannotAcquireCloudClientParameter(comProgress);
     354            else
     355                m_comVSDForm = comForm;
     356        }
     357    }
     358}
     359
    328360void UIWizardImportAppPage1::updatePageAppearance()
    329361{
     
    774806    if (isSourceCloudOne())
    775807    {
    776         /* Read Cloud Client description form: */
    777         CVirtualSystemDescriptionForm comForm;
    778         CProgress comProgress = m_comCloudClient.GetExportLaunchDescriptionForm(comForm);
    779 
    780         /* Show error message if necessary: */
    781         if (!m_comCloudClient.isOk())
    782         {
    783             msgCenter().cannotAcquireCloudClientParameter(m_comCloudClient);
    784             return false;
    785         }
    786         else
    787         {
    788             /* Show "Acquire export form" progress: */
    789             msgCenter().showModalProgressDialog(comProgress,
    790                                                 UIWizardImportApp::tr("Acquire export form..."),
    791                                                 ":/progress_reading_appliance_90px.png",
    792                                                 0, 0);
    793 
    794             /* Show error message if necessary: */
    795             if (!comProgress.isOk() || comProgress.GetResultCode() != 0)
    796             {
    797                 msgCenter().cannotAcquireCloudClientParameter(m_comCloudClient);
    798                 return false;
    799             }
    800             else
    801                 m_comVSDForm = comForm;
    802         }
    803         return true;
     808        /* Populate form properties: */
     809        populateFormProperties();
     810        /* And make sure they are not null: */
     811        return m_comVSDForm.isNotNull();
    804812    }
    805813    else
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.h

    r78216 r78273  
    7575    /** Populates account instances. */
    7676    void populateAccountInstances();
     77    /** Populates form properties. */
     78    void populateFormProperties();
    7779
    7880    /** Updates page appearance. */
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