diff options
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 3cb6cb302..cf55fa10b 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -75,6 +75,8 @@ #include "gui/widgets/scrollarea.h" #include "gui/widgets/tabs/tab.h" +#include "utils/delete2.h" + #include "debug.h" TabbedArea::TabbedArea(const Widget2 *const widget) : @@ -127,21 +129,14 @@ TabbedArea::~TabbedArea() remove(mTabContainer); remove(mWidgetContainer); - delete mTabContainer; - mTabContainer = nullptr; - delete mWidgetContainer; - mWidgetContainer = nullptr; + delete2(mTabContainer); + delete2(mWidgetContainer); for (size_t i = 0, sz = mTabsToDelete.size(); i < sz; i++) - { - delete mTabsToDelete[i]; - mTabsToDelete[i] = nullptr; - } + delete2(mTabsToDelete[i]) - delete mArrowButton[0]; - mArrowButton[0] = nullptr; - delete mArrowButton[1]; - mArrowButton[1] = nullptr; + delete2(mArrowButton[0]); + delete2(mArrowButton[1]); } void TabbedArea::enableScrollButtons(const bool enable) |