VirtualBox

Changeset 91579 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 5, 2021 5:32:35 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9996: UIApplianceEditorWidget: Unify appliance member access for both sub-classes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/widgets
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp

    r91565 r91579  
    17651765UIApplianceEditorWidget::UIApplianceEditorWidget(QWidget *pParent /* = 0 */)
    17661766    : QIWithRetranslateUI<QWidget>(pParent)
    1767     , m_pAppliance(0)
    17681767    , m_pModel(0)
    17691768{
     
    18481847    /* Translate finally: */
    18491848    retranslateUi();
     1849}
     1850
     1851void UIApplianceEditorWidget::setAppliance(const CAppliance &comAppliance)
     1852{
     1853    m_comAppliance = comAppliance;
    18501854}
    18511855
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.h

    r91565 r91579  
    3434/* COM includes: */
    3535#include "COMEnums.h"
     36#include "CAppliance.h"
    3637#include "CVirtualSystemDescription.h"
    3738
     
    294295    UIApplianceEditorWidget(QWidget *pParent = 0);
    295296
     297    /** Defines @a comAppliance wrapper instance. */
     298    virtual void setAppliance(const CAppliance &comAppliance);
     299
    296300    /** Defines the list of VSD @a hints. */
    297301    void setVsdHints(const AbstractVSDParameterList &hints);
    298 
    299     /** Returns whether the Appliance Editor has valid state. */
    300     bool isValid() const { return m_pAppliance != 0; }
    301     /** Returns the currently set appliance reference. */
    302     CAppliance *appliance() const { return m_pAppliance; }
    303302
    304303    /** Defines virtual system base folder @a strPath. */
     
    324323    virtual void retranslateUi() /* override */;
    325324
     325    /** Holds the currently set appliance reference. */
     326    CAppliance  m_comAppliance;
     327
    326328    /** Holds the list of VSD hints. */
    327329    AbstractVSDParameterList  m_listVsdHints;
    328330
    329     /** Holds the currently set appliance reference. */
    330     CAppliance         *m_pAppliance;
    331331    /** Holds the Appliance model reference. */
    332332    UIApplianceModel *m_pModel;
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.cpp

    r91541 r91579  
    6363void UIApplianceExportEditorWidget::setAppliance(const CAppliance &comAppliance)
    6464{
    65     /* Cache newly passed appliance: */
    66     m_comAppliance = comAppliance;
     65    /* Call to base-class: */
     66    UIApplianceEditorWidget::setAppliance(comAppliance);
    6767
    6868    /* Cleanup previous stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceExportEditorWidget.h

    r91539 r91579  
    3939
    4040    /** Assigns @a comAppliance and populates widget contents. */
    41     void setAppliance(const CAppliance &comAppliance);
     41    virtual void setAppliance(const CAppliance &comAppliance) /* override final */;
    4242
    4343    /** Prepares export by pushing edited data back to appliance. */
    4444    void prepareExport();
    45 
    46 private:
    47 
    48     /** Holds the appliance wrapper instance. */
    49     CAppliance  m_comAppliance;
    5045};
    5146
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp

    r91578 r91579  
    5050void UIApplianceImportEditorWidget::setAppliance(const CAppliance &comAppliance)
    5151{
    52     /* Cache newly passed appliance: */
    53     m_comAppliance = comAppliance;
     52    /* Call to base-class: */
     53    UIApplianceEditorWidget::setAppliance(comAppliance);
    5454
    5555    /* Cleanup previous stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h

    r91578 r91579  
    3939
    4040    /** Assigns @a comAppliance and populates widget contents. */
    41     void setAppliance(const CAppliance &comAppliance);
     41    virtual void setAppliance(const CAppliance &comAppliance) /* override final */;
    4242
    4343    /** Prepares import by pushing edited data back to appliance. */
    4444    void prepareImport();
    45 
    46 private:
    47 
    48     /** Holds the appliance wrapper instance. */
    49     CAppliance  m_comAppliance;
    5045};
    5146
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