VirtualBox

Ignore:
Timestamp:
Mar 11, 2022 5:25:06 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: Fixes for possible crashes; Should restrict Expert button while async progress being executed.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/wizards
Files:
10 edited

Legend:

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

    r94069 r94182  
    109109bool UINativeWizard::handleNotificationProgressNow(UINotificationProgress *pProgress)
    110110{
    111     return m_pNotificationCenter->handleNow(pProgress);
     111    wizardButton(WizardButtonType_Expert)->setEnabled(false);
     112    const bool fResult = m_pNotificationCenter->handleNow(pProgress);
     113    wizardButton(WizardButtonType_Expert)->setEnabled(true);
     114    return fResult;
     115}
     116
     117QPushButton *UINativeWizard::wizardButton(const WizardButtonType &enmType) const
     118{
     119    return m_buttons.value(enmType);
    112120}
    113121
     
    119127    /* Call to base-class: */
    120128    return QIWithRetranslateUI<QDialog>::exec();
    121 }
    122 
    123 QPushButton *UINativeWizard::wizardButton(const WizardButtonType &enmType) const
    124 {
    125     return m_buttons.value(enmType);
    126129}
    127130
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.h

    r93990 r94182  
    9595    bool handleNotificationProgressNow(UINotificationProgress *pProgress);
    9696
     97    /** Returns wizard button of specified @a enmType. */
     98    QPushButton *wizardButton(const WizardButtonType &enmType) const;
     99
    97100public slots:
    98101
     
    107110    /** Returns wizard mode. */
    108111    WizardMode mode() const { return m_enmMode; }
    109 
    110     /** Returns wizard button of specified @a enmType. */
    111     QPushButton *wizardButton(const WizardButtonType &enmType) const;
    112112    /** Defines @a strName for wizard button of specified @a enmType. */
    113113    void setWizardButtonName(const WizardButtonType &enmType, const QString &strName);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp

    r94166 r94182  
    2020#include <QHeaderView>
    2121#include <QListWidget>
     22#include <QPushButton>
    2223#include <QTableWidget>
    2324#include <QVBoxLayout>
     
    243244
    244245    /* Update profile instances: */
     246    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    245247    populateProfileInstances(m_pSourceInstanceList, wizard()->notificationCenter(), wizard()->client());
     248    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    246249    sltHandleSourceInstanceChange();
    247250
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageSource.cpp

    r94166 r94182  
    2121#include <QLabel>
    2222#include <QListWidget>
     23#include <QPushButton>
    2324#include <QVBoxLayout>
    2425
     
    478479
    479480    /* Update profile instances: */
     481    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    480482    populateProfileInstances(m_pSourceInstanceList, wizard()->notificationCenter(), wizard()->client());
     483    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    481484    sltHandleSourceInstanceChange();
    482485
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp

    r93115 r94182  
    2525#include <QLineEdit>
    2626#include <QListWidget>
     27#include <QPushButton>
    2728#include <QRadioButton>
    2829#include <QStackedWidget>
     
    805806    CVirtualSystemDescription comDescription;
    806807    CVirtualSystemDescriptionForm comForm;
     808    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    807809    refreshCloudStuff(comAppliance,
    808810                      comClient,
     
    814816                      wizard()->uri(),
    815817                      wizard()->cloudExportMode());
     818    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    816819    wizard()->setCloudAppliance(comAppliance);
    817820    wizard()->setCloudClient(comClient);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageFormat.cpp

    r93115 r94182  
    2222#include <QGridLayout>
    2323#include <QLabel>
     24#include <QPushButton>
    2425#include <QRadioButton>
    2526#include <QStackedWidget>
     
    11511152    CVirtualSystemDescription comDescription;
    11521153    CVirtualSystemDescriptionForm comForm;
     1154    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    11531155    refreshCloudStuff(comAppliance,
    11541156                      comClient,
     
    11601162                      wizard()->uri(),
    11611163                      wizard()->cloudExportMode());
     1164    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    11621165    wizard()->setCloudAppliance(comAppliance);
    11631166    wizard()->setCloudClient(comClient);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp

    r93998 r94182  
    2323#include <QLabel>
    2424#include <QListWidget>
     25#include <QPushButton>
    2526#include <QStackedWidget>
    2627#include <QTableWidget>
     
    570571{
    571572    /* Refresh profile instances: */
     573    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    572574    refreshCloudProfileInstances(m_pProfileInstanceList,
    573575                                 wizard()->notificationCenter(),
     
    575577                                 profileName(m_pProfileComboBox),
    576578                                 wizard()->isSourceCloudOne());
     579    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    577580    sltHandleInstanceListChange();
    578581
     
    593596    CAppliance comAppliance;
    594597    CVirtualSystemDescriptionForm comForm;
     598    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    595599    refreshCloudStuff(comAppliance,
    596600                      comForm,
     
    600604                      profileName(m_pProfileComboBox),
    601605                      wizard()->isSourceCloudOne());
     606    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    602607    wizard()->setCloudAppliance(comAppliance);
    603608    wizard()->setVsdImportForm(comForm);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp

    r93998 r94182  
    2020#include <QLabel>
    2121#include <QListWidget>
     22#include <QPushButton>
    2223#include <QStackedWidget>
    2324
     
    788789{
    789790    /* Refresh required settings: */
     791    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    790792    refreshCloudProfileInstances(m_pProfileInstanceList,
    791793                                 wizard()->notificationCenter(),
     
    793795                                 profileName(m_pProfileComboBox),
    794796                                 wizard()->isSourceCloudOne());
     797    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    795798
    796799    /* Notify about changes: */
     
    816819    CAppliance comAppliance;
    817820    CVirtualSystemDescriptionForm comForm;
     821    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    818822    refreshCloudStuff(comAppliance,
    819823                      comForm,
     
    823827                      profileName(m_pProfileComboBox),
    824828                      wizard()->isSourceCloudOne());
     829    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    825830    wizard()->setCloudAppliance(comAppliance);
    826831    wizard()->setVsdImportForm(comForm);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp

    r94167 r94182  
    1919#include <QHeaderView>
    2020#include <QListWidget>
     21#include <QPushButton>
    2122#include <QTabBar>
    2223#include <QVBoxLayout>
     
    332333{
    333334    /* Update source type: */
     335    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    334336    populateSourceImages(m_pSourceImageList, m_pSourceTabBar, wizard()->notificationCenter(), wizard()->client());
     337    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    335338    sltHandleSourceImageChange();
    336339
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageSource.cpp

    r93998 r94182  
    2020#include <QLabel>
    2121#include <QListWidget>
     22#include <QPushButton>
    2223#include <QTabBar>
    2324#include <QVBoxLayout>
     
    566567{
    567568    /* Update source type: */
     569    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(false);
    568570    populateSourceImages(m_pSourceImageList, m_pSourceTabBar, wizard()->notificationCenter(), wizard()->client());
     571    wizard()->wizardButton(WizardButtonType_Expert)->setEnabled(true);
    569572    sltHandleSourceImageChange();
    570573
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