Fix QMenuItem connections

Don't emit twice textChanged when changed.
checkableChanged signal doesn't exist anymore. Use changed instead as
suggested by the Q_PROPERTY
This commit is contained in:
Aleix Pol 2014-01-07 16:45:08 +01:00
parent 3feb6ac3ae
commit e1a868e4f6

View File

@ -43,9 +43,8 @@ void QMenuItem::setAction(QAction* a)
}
m_action = a;
connect(m_action, &QAction::changed, this, &QMenuItem::textChanged);
connect(m_action, &QAction::changed, this, &QMenuItem::textChanged);
connect(m_action, &QAction::changed, this, &QMenuItem::checkableChanged);
connect(m_action, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
connect(m_action, SIGNAL(checkableChanged()), this, SIGNAL(checkableChanged()));
emit actionChanged();
}
}