VirtualBox

Changeset 91698 in vbox


Ignore:
Timestamp:
Oct 12, 2021 5:59:15 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: A bit of cleanup for redundant stuff in UIWizardNewCloudVM.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp

    r91640 r91698  
    311311void UIWizardNewCloudVMPageExpert::sltHandleProviderComboChange()
    312312{
    313     updateProvider();
     313    /* Update combo tool-tip: */
     314    updateComboToolTip(m_pProviderComboBox);
     315
     316    /* Update wizard fields: */
     317    wizard()->setProviderShortName(m_pProviderComboBox->currentData(ProviderData_ShortName).toString());
     318
     319    /* Update profiles: */
     320    populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
     321    sltHandleProfileComboChange();
     322
     323    /* Notify about changes: */
    314324    emit completeChanged();
    315325}
     
    317327void UIWizardNewCloudVMPageExpert::sltHandleProfileComboChange()
    318328{
    319     updateProfile();
     329    /* Update wizard fields: */
     330    wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
     331    wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
     332
     333    /* Update source: */
     334    sltHandleSourceTabBarChange();
     335
     336    /* Notify about changes: */
    320337    emit completeChanged();
    321338}
     
    329346void UIWizardNewCloudVMPageExpert::sltHandleSourceTabBarChange()
    330347{
    331     updateSource();
     348    /* Update source type: */
     349    populateSourceImages(m_pSourceImageList, m_pSourceTabBar, wizard()->client());
     350    sltHandleSourceImageChange();
     351
     352    /* Notify about changes: */
    332353    emit completeChanged();
    333354}
     
    335356void UIWizardNewCloudVMPageExpert::sltHandleSourceImageChange()
    336357{
    337     updateSourceImage();
    338     emit completeChanged();
    339 }
    340 
    341 void UIWizardNewCloudVMPageExpert::updateProvider()
    342 {
    343     updateComboToolTip(m_pProviderComboBox);
    344     wizard()->setProviderShortName(m_pProviderComboBox->currentData(ProviderData_ShortName).toString());
    345     populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
    346     updateProfile();
    347 }
    348 
    349 void UIWizardNewCloudVMPageExpert::updateProfile()
    350 {
    351     wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
    352     wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
    353     updateSource();
    354 }
    355 
    356 void UIWizardNewCloudVMPageExpert::updateSource()
    357 {
    358     populateSourceImages(m_pSourceImageList, m_pSourceTabBar, wizard()->client());
    359     updateSourceImage();
    360 }
    361 
    362 void UIWizardNewCloudVMPageExpert::updateSourceImage()
    363 {
     358    /* Update source image & VSD form: */
    364359    m_strSourceImageId = currentListWidgetData(m_pSourceImageList);
    365     updateVSDForm();
    366 }
    367 
    368 void UIWizardNewCloudVMPageExpert::updateVSDForm()
    369 {
    370360    wizard()->setVSD(createVirtualSystemDescription(wizard()));
    371361    populateFormProperties(wizard()->vsd(), m_pSourceTabBar, m_strSourceImageId);
    372362    wizard()->createVSDForm();
    373363    updatePropertiesTable();
     364
     365    /* Notify about changes: */
     366    emit completeChanged();
    374367}
    375368
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.h

    r91640 r91698  
    7676private:
    7777
    78     /** Updates provider. */
    79     void updateProvider();
    80     /** Updates profile. */
    81     void updateProfile();
    82     /** Updates source. */
    83     void updateSource();
    84     /** Updates source image. */
    85     void updateSourceImage();
    86     /** Updates VSD form. */
    87     void updateVSDForm();
    8878    /** Updates properties table. */
    8979    void updatePropertiesTable();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.cpp

    r91640 r91698  
    530530void UIWizardNewCloudVMPageSource::sltHandleProviderComboChange()
    531531{
    532     updateProvider();
     532    /* Update combo tool-tip: */
     533    updateComboToolTip(m_pProviderComboBox);
     534
     535    /* Update wizard fields: */
     536    wizard()->setProviderShortName(m_pProviderComboBox->currentData(ProviderData_ShortName).toString());
     537
     538    /* Update profiles: */
     539    populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
     540    sltHandleProfileComboChange();
     541
     542    /* Notify about changes: */
    533543    emit completeChanged();
    534544}
     
    536546void UIWizardNewCloudVMPageSource::sltHandleProfileComboChange()
    537547{
    538     updateProfile();
     548    /* Update wizard fields: */
     549    wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
     550    wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
     551
     552    /* Update source: */
     553    sltHandleSourceTabBarChange();
     554
     555    /* Notify about changes: */
    539556    emit completeChanged();
    540557}
     
    548565void UIWizardNewCloudVMPageSource::sltHandleSourceTabBarChange()
    549566{
    550     updateSource();
     567    /* Update source type: */
     568    populateSourceImages(m_pSourceImageList, m_pSourceTabBar, wizard()->client());
     569    sltHandleSourceImageChange();
     570
     571    /* Notify about changes: */
    551572    emit completeChanged();
    552573}
     
    554575void UIWizardNewCloudVMPageSource::sltHandleSourceImageChange()
    555576{
    556     updateSourceImage();
     577    /* Update source image: */
     578    m_strSourceImageId = currentListWidgetData(m_pSourceImageList);
     579
     580    /* Notify about changes: */
    557581    emit completeChanged();
    558582}
    559 
    560 void UIWizardNewCloudVMPageSource::updateProvider()
    561 {
    562     updateComboToolTip(m_pProviderComboBox);
    563     wizard()->setProviderShortName(m_pProviderComboBox->currentData(ProviderData_ShortName).toString());
    564     populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
    565     updateProfile();
    566 }
    567 
    568 void UIWizardNewCloudVMPageSource::updateProfile()
    569 {
    570     wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
    571     wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
    572     updateSource();
    573 }
    574 
    575 void UIWizardNewCloudVMPageSource::updateSource()
    576 {
    577     populateSourceImages(m_pSourceImageList, m_pSourceTabBar, wizard()->client());
    578     updateSourceImage();
    579 }
    580 
    581 void UIWizardNewCloudVMPageSource::updateSourceImage()
    582 {
    583     m_strSourceImageId = currentListWidgetData(m_pSourceImageList);
    584 }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.h

    r91640 r91698  
    121121private:
    122122
    123     /** Updates provider. */
    124     void updateProvider();
    125     /** Updates profile. */
    126     void updateProfile();
    127     /** Updates source. */
    128     void updateSource();
    129     /** Updates source image. */
    130     void updateSourceImage();
    131 
    132123    /** Holds the image ID. */
    133124    QString  m_strSourceImageId;
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