test fix for Austin's repro

This commit is contained in:
ZappoMan 2015-03-11 23:55:53 -07:00
parent 356dbbec72
commit b798761ec5

View file

@ -704,6 +704,12 @@ void Menu::removeAction(QMenu* menu, const QString& actionName) {
}
void Menu::setIsOptionChecked(const QString& menuOption, bool isChecked) {
if (thread() != QThread::currentThread()) {
QMetaObject::invokeMethod(Menu::getInstance(), "setIsOptionChecked", Qt::BlockingQueuedConnection,
Q_ARG(const QString&, menuOption),
Q_ARG(bool, isChecked));
return;
}
QAction* menu = _actionHash.value(menuOption);
if (menu) {
menu->setChecked(isChecked);