forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user