diff options
| author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-03-13 11:54:49 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-13 16:18:30 +0100 |
| commit | dd2ad972ed11665c58694b5334de01454aa5c486 (patch) | |
| tree | 11ff8bc83ede87320507724a5bcf8aac83eb4fc4 /src/controls/qtaction_p.h | |
| parent | 9f47b7cbd9b20949ba35bc9c06d14fed46e83ca5 (diff) | |
| download | qtquickcontrols-dd2ad972ed11665c58694b5334de01454aa5c486.tar.gz | |
Fix crash in exclusive group
When the current item gets removed
we need to properly clean up.
Change-Id: I2a844319bbf8513b6ed5e40eccb15b6d03b73df9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/controls/qtaction_p.h')
| -rw-r--r-- | src/controls/qtaction_p.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/controls/qtaction_p.h b/src/controls/qtaction_p.h index 6386ed8e..693cf56c 100644 --- a/src/controls/qtaction_p.h +++ b/src/controls/qtaction_p.h @@ -47,6 +47,7 @@ #include <QtCore/qvariant.h> #include <QtGui/qicon.h> #include <QtGui/qkeysequence.h> +#include <QtCore/qpointer.h> QT_BEGIN_NAMESPACE @@ -100,8 +101,8 @@ public: bool isChecked() const { return m_checked; } void setChecked(bool c); - QtExclusiveGroup *exclusiveGroup() const { return m_exclusiveGroup; } - void setExclusiveGroup(QtExclusiveGroup * arg); + QtExclusiveGroup *exclusiveGroup() const; + void setExclusiveGroup(QtExclusiveGroup *arg); QIcon icon() const { return m_icon; } QVariant iconVariant() const { return QVariant(m_icon); } @@ -136,7 +137,7 @@ private: bool m_enabled; bool m_checkable; bool m_checked; - QtExclusiveGroup *m_exclusiveGroup; + QPointer<QtExclusiveGroup> m_exclusiveGroup; QKeySequence m_shortcut; QKeySequence m_mnemonic; QString m_tooltip; |
