aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates2/qquickaction.cpp')
-rw-r--r--src/quicktemplates2/qquickaction.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickaction.cpp b/src/quicktemplates2/qquickaction.cpp
index fb6d7c3e..0e51daef 100644
--- a/src/quicktemplates2/qquickaction.cpp
+++ b/src/quicktemplates2/qquickaction.cpp
@@ -526,10 +526,13 @@ void QQuickAction::trigger(QObject *source)
if (!d->enabled)
return;
- if (d->checkable)
+ QPointer<QObject> guard = this;
+ // the checked action of an exclusive group cannot be unchecked
+ if (d->checkable && (!d->checked || !d->group || !d->group->isExclusive() || d->group->checkedAction() != this))
toggle(source);
- emit triggered(source);
+ if (!guard.isNull())
+ emit triggered(source);
}
bool QQuickAction::event(QEvent *event)