VirtualBox

Ignore:
Timestamp:
Jul 23, 2018 1:25:18 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123928
Message:

FE/Qt: bugref:9152: UIApplianceEditorWidget: Pass the model to the elements so that they could use it.

File:
1 edited

Legend:

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

    r73118 r73320  
    158158
    159159    /** Constructs item passing @a iNumber and @a pParentItem to the base-class.
     160      * @param  pParent              Brings the parent reference.
    160161      * @param  enmVSDType           Brings the Virtual System Description type.
    161162      * @param  strRef               Brings something totally useless.
     
    163164      * @param  strConfigValue       Brings the configuration value.
    164165      * @param  strExtraConfigValue  Brings the extra configuration value. */
    165     UIVirtualHardwareItem(int iNumber,
     166    UIVirtualHardwareItem(UIApplianceModel *pParent,
     167                          int iNumber,
    166168                          KVirtualSystemDescriptionType enmVSDType,
    167169                          const QString &strRef,
     
    198200
    199201private:
     202
     203    /** Holds the parent reference. */
     204    UIApplianceModel *m_pParent;
    200205
    201206    /** Holds the Virtual System Description type. */
     
    328333*********************************************************************************************************************************/
    329334
    330 UIVirtualHardwareItem::UIVirtualHardwareItem(int iNumber,
     335UIVirtualHardwareItem::UIVirtualHardwareItem(UIApplianceModel *pParent,
     336                                             int iNumber,
    331337                                             KVirtualSystemDescriptionType enmVSDType,
    332338                                             const QString &strRef,
    333                                              const QString &aOrigValue,
     339                                             const QString &strOrigValue,
    334340                                             const QString &strConfigValue,
    335341                                             const QString &strExtraConfigValue,
    336342                                             UIApplianceModelItem *pParentItem)
    337343    : UIApplianceModelItem(iNumber, ApplianceModelItemType_VirtualHardware, pParentItem)
     344    , m_pParent(pParent)
    338345    , m_enmVSDType(enmVSDType)
    339346    , m_strRef(strRef)
    340     , m_strOrigValue(aOrigValue)
     347    , m_strOrigValue(strOrigValue)
    341348    , m_strConfigValue(strConfigValue)
    342349    , m_strConfigDefaultValue(strConfigValue)
     
    10071014            else
    10081015            {
    1009                 UIVirtualHardwareItem *pHardwareItem = new UIVirtualHardwareItem(i, types[i], refs[i], origValues[i], configValues[i], extraConfigValues[i], pVirtualSystemItem);
     1016                UIVirtualHardwareItem *pHardwareItem = new UIVirtualHardwareItem(this, i, types[i], refs[i], origValues[i], configValues[i], extraConfigValues[i], pVirtualSystemItem);
    10101017                pVirtualSystemItem->appendChild(pHardwareItem);
    10111018                /* Save the hard disk controller types in an extra map */
     
    10301037                {
    10311038                    /* New hardware item as child of the controller */
    1032                     UIVirtualHardwareItem *pStorageItem = new UIVirtualHardwareItem(i, types[i], refs[i], origValues[i], configValues[i], extraConfigValues[i], pControllerItem);
     1039                    UIVirtualHardwareItem *pStorageItem = new UIVirtualHardwareItem(this, i, types[i], refs[i], origValues[i], configValues[i], extraConfigValues[i], pControllerItem);
    10331040                    pControllerItem->appendChild(pStorageItem);
    10341041                }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette