VirtualBox

Changeset 64082 in vbox


Ignore:
Timestamp:
Sep 28, 2016 2:14:15 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111021
Message:

FE/Qt: bugref:6899: Accessibility support (step 60): A bit of cleanup/prepare care for settings selector.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.cpp

    r64081 r64082  
    212212UISettingsSelectorTreeView::UISettingsSelectorTreeView(QWidget *pParent /* = 0 */)
    213213    : UISettingsSelector(pParent)
    214 {
     214    , m_pTreeWidget(0)
     215{
     216    /* Prepare the tree-widget: */
    215217    m_pTreeWidget = new QITreeWidget(pParent);
    216     /* Configure the selector: */
    217218    QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
    218219    sizePolicy.setHorizontalStretch(0);
     
    240241}
    241242
     243UISettingsSelectorTreeView::~UISettingsSelectorTreeView()
     244{
     245    /* Cleanup the tree-widget: */
     246    delete m_pTreeWidget;
     247    m_pTreeWidget = 0;
     248}
     249
    242250QWidget *UISettingsSelectorTreeView::widget() const
    243251{
     
    428436UISettingsSelectorToolBar::UISettingsSelectorToolBar(QWidget *pParent /* = 0 */)
    429437    : UISettingsSelector(pParent)
    430 {
    431     /* Init the toolbar: */
     438    , m_pToolBar(0)
     439    , m_pActionGroup(0)
     440{
     441    /* Prepare the toolbar: */
    432442    m_pToolBar = new UIToolBar(pParent);
    433443    m_pToolBar->setUseTextLabels(true);
     
    436446    m_pToolBar->setShowToolBarButton(false);
    437447#endif /* VBOX_WS_MAC */
    438     /* Init the action group for house keeping: */
     448
     449    /* Prepare the action group: */
    439450    m_pActionGroup = new QActionGroup(this);
    440451    m_pActionGroup->setExclusive(true);
     
    445456UISettingsSelectorToolBar::~UISettingsSelectorToolBar()
    446457{
     458    /* Cleanup the action group: */
     459    delete m_pActionGroup;
     460    m_pActionGroup = 0;
     461
     462    /* Cleanup the toolbar: */
    447463    delete m_pToolBar;
     464    m_pToolBar = 0;
    448465}
    449466
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.h

    r64081 r64082  
    132132    /** Constructs settings selector passing @a pParent to the base-class. */
    133133    UISettingsSelectorTreeView(QWidget *pParent = 0);
     134    /** Destructs settings selector. */
     135    ~UISettingsSelectorTreeView();
    134136
    135137    /** Returns the widget selector operates on. */
     
    200202    /** Constructs settings selector passing @a pParent to the base-class. */
    201203    UISettingsSelectorToolBar(QWidget *pParent = 0);
     204    /** Destructs settings selector. */
    202205    ~UISettingsSelectorToolBar();
    203206
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