diff options
author | hjk <hjk@theqtcompany.com> | 2016-03-14 12:10:13 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2016-03-14 13:15:39 +0000 |
commit | c3772bfd4c52c453179b7e121900c06f72ed36a2 (patch) | |
tree | a1835e236f73ac6f1356c68fcba177bb28604ae6 /src/libs/utils/proxyaction.cpp | |
parent | 3d82a67484d1fdbd3768eefcaf9e282c01e34280 (diff) |
ProxyAction: Break endless loop
Updating the ProxyAction first disconnects from the action and then
connects again. Looks like reconnecting while being in
QMetaObject::activate can lead to never ending handling of the
activation, so use a QueuedConnection instead.
Change-Id: Ia06f926413fd4492d847dfea4461f2ccfdd37ffc
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/proxyaction.cpp')
-rw-r--r-- | src/libs/utils/proxyaction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs/utils/proxyaction.cpp b/src/libs/utils/proxyaction.cpp index 7ccc5dcc967..ecb853751c0 100644 --- a/src/libs/utils/proxyaction.cpp +++ b/src/libs/utils/proxyaction.cpp @@ -72,7 +72,8 @@ void ProxyAction::disconnectAction() void ProxyAction::connectAction() { if (m_action) { - connect(m_action.data(), &QAction::changed, this, &ProxyAction::actionChanged); + connect(m_action.data(), &QAction::changed, this, &ProxyAction::actionChanged, + Qt::QueuedConnection); connect(this, &QAction::triggered, m_action.data(), &QAction::triggered); connect(this, &ProxyAction::toggled, m_action.data(), &QAction::setChecked); } |