VirtualBox

Changeset 91697 in vbox for trunk/src


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

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

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp

    r91411 r91697  
    208208void UIWizardAddCloudVMPageExpert::sltHandleProviderComboChange()
    209209{
    210     updateProvider();
     210    /* Update combo tool-tip: */
     211    updateComboToolTip(m_pProviderComboBox);
     212
     213    /* Update wizard fields: */
     214    wizard()->setProviderShortName(m_pProviderComboBox->currentData(ProviderData_ShortName).toString());
     215
     216    /* Update profiles: */
     217    populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
     218    sltHandleProfileComboChange();
     219
     220    /* Notify about changes: */
    211221    emit completeChanged();
    212222}
     
    214224void UIWizardAddCloudVMPageExpert::sltHandleProfileComboChange()
    215225{
    216     updateProfile();
     226    /* Update wizard fields: */
     227    wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
     228    wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
     229
     230    /* Update profile instances: */
     231    populateProfileInstances(m_pSourceInstanceList, wizard()->client());
     232    sltHandleSourceInstanceChange();
     233
     234    /* Notify about changes: */
    217235    emit completeChanged();
    218236}
     
    226244void UIWizardAddCloudVMPageExpert::sltHandleSourceInstanceChange()
    227245{
    228     updateSourceInstance();
     246    /* Update wizard fields: */
     247    wizard()->setInstanceIds(currentListWidgetData(m_pSourceInstanceList));
     248
     249    /* Notify about changes: */
    229250    emit completeChanged();
    230251}
    231 
    232 void UIWizardAddCloudVMPageExpert::updateProvider()
    233 {
    234     updateComboToolTip(m_pProviderComboBox);
    235     wizard()->setProviderShortName(m_pProviderComboBox->currentData(ProviderData_ShortName).toString());
    236     populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
    237     updateProfile();
    238 }
    239 
    240 void UIWizardAddCloudVMPageExpert::updateProfile()
    241 {
    242     wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
    243     wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
    244     populateProfileInstances(m_pSourceInstanceList, wizard()->client());
    245     updateSourceInstance();
    246 }
    247 
    248 void UIWizardAddCloudVMPageExpert::updateSourceInstance()
    249 {
    250     wizard()->setInstanceIds(currentListWidgetData(m_pSourceInstanceList));
    251 }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.h

    r91367 r91697  
    7272private:
    7373
    74     /** Updates provider. */
    75     void updateProvider();
    76     /** Updates profile. */
    77     void updateProfile();
    78     /** Updates source instance. */
    79     void updateSourceInstance();
    80 
    8174    /** Holds the provider container instance. */
    8275    QGroupBox *m_pCntProvider;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.cpp

    r91411 r91697  
    460460void UIWizardAddCloudVMPageSource::sltHandleProviderComboChange()
    461461{
    462     updateProvider();
     462    /* Update combo tool-tip: */
     463    updateComboToolTip(m_pProviderComboBox);
     464
     465    /* Update wizard fields: */
     466    wizard()->setProviderShortName(m_pProviderComboBox->currentData(ProviderData_ShortName).toString());
     467
     468    /* Update profiles: */
     469    populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
     470    sltHandleProfileComboChange();
     471
     472    /* Notify about changes: */
    463473    emit completeChanged();
    464474}
     
    466476void UIWizardAddCloudVMPageSource::sltHandleProfileComboChange()
    467477{
    468     updateProfile();
     478    /* Update wizard fields: */
     479    wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
     480    wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
     481
     482    /* Update profile instances: */
     483    populateProfileInstances(m_pSourceInstanceList, wizard()->client());
     484    sltHandleSourceInstanceChange();
     485
     486    /* Notify about changes: */
    469487    emit completeChanged();
    470488}
     
    478496void UIWizardAddCloudVMPageSource::sltHandleSourceInstanceChange()
    479497{
    480     updateSourceInstance();
     498    /* Update wizard fields: */
     499    wizard()->setInstanceIds(currentListWidgetData(m_pSourceInstanceList));
     500
     501    /* Notify about changes: */
    481502    emit completeChanged();
    482503}
    483 
    484 void UIWizardAddCloudVMPageSource::updateProvider()
    485 {
    486     updateComboToolTip(m_pProviderComboBox);
    487     wizard()->setProviderShortName(m_pProviderComboBox->currentData(ProviderData_ShortName).toString());
    488     populateProfiles(m_pProfileComboBox, wizard()->providerShortName(), wizard()->profileName());
    489     updateProfile();
    490 }
    491 
    492 void UIWizardAddCloudVMPageSource::updateProfile()
    493 {
    494     wizard()->setProfileName(m_pProfileComboBox->currentData(ProfileData_Name).toString());
    495     wizard()->setClient(cloudClientByName(wizard()->providerShortName(), wizard()->profileName(), wizard()));
    496     populateProfileInstances(m_pSourceInstanceList, wizard()->client());
    497     updateSourceInstance();
    498 }
    499 
    500 void UIWizardAddCloudVMPageSource::updateSourceInstance()
    501 {
    502     wizard()->setInstanceIds(currentListWidgetData(m_pSourceInstanceList));
    503 }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.h

    r91410 r91697  
    113113private:
    114114
    115     /** Updates provider. */
    116     void updateProvider();
    117     /** Updates profile. */
    118     void updateProfile();
    119     /** Updates source instance. */
    120     void updateSourceInstance();
    121 
    122115    /** Holds the main label instance. */
    123116    QIRichTextLabel *m_pLabelMain;
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