diff options
author | Daniel d'Andrada <daniel.dandrada@nokia.com> | 2010-09-17 16:49:00 +0300 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@nokia.com> | 2010-09-17 17:01:08 +0300 |
commit | 8931b04dc7e0a6a15162a0f714896d30b0582ffb (patch) | |
tree | 7f8ad60d85234dac146d37a263e77c6eb2856385 | |
parent | 95b88f40ab97b640f9dca71c67a731d907be949e (diff) |
Changes: Fix the MButtonGroup mess a little
RevBy: Stanislav Ionascu
-rw-r--r-- | src/corelib/widgets/mbutton_p.h | 4 | ||||
-rw-r--r-- | src/views/mtoolbarview.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/widgets/mbutton_p.h b/src/corelib/widgets/mbutton_p.h index 20150851..7fdd590e 100644 --- a/src/corelib/widgets/mbutton_p.h +++ b/src/corelib/widgets/mbutton_p.h @@ -25,6 +25,8 @@ class MStyle; class MButtonGroup; +#include <QPointer> + class M_EXPORT MButtonPrivate : protected MWidgetControllerPrivate { public: @@ -36,7 +38,7 @@ public: void init(); void init(const QString &iconID, const QString &text); - MButtonGroup *buttonGroup; + QPointer<MButtonGroup> buttonGroup; }; #endif diff --git a/src/views/mtoolbarview.cpp b/src/views/mtoolbarview.cpp index 9cefc587..580173e0 100644 --- a/src/views/mtoolbarview.cpp +++ b/src/views/mtoolbarview.cpp @@ -180,8 +180,6 @@ MToolBarViewPrivate::~MToolBarViewPrivate() { removeEventFilter(controller); if(buttonGroup) { - foreach(MButton *button, buttonGroup->buttons()) - buttonGroup->removeButton(button); delete buttonGroup; buttonGroup = NULL; } @@ -327,7 +325,7 @@ void MToolBarViewPrivate::change(QAction *action) remove(action, false); // I don't think this is possible return; } - + MWidget *widget = q->getWidget(action); if (!widget) { //We need to add the action |