Showing the changes to interface/src/scripting/MenuScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -65,9 +65,15 @@ void MenuScriptingInterface::removeMenuItem(const QString& menu, const QString& · 64 unmodified lines | |||
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | bool MenuScriptingInterface::isOptionChecked(const QString& menuOption) { | 67 | bool MenuScriptingInterface::isOptionChecked(const QString& menuOption) { |
| 68 | return Menu::getInstance()->isOptionChecked(menuOption); | 68 | bool result; |
| 69 | QMetaObject::invokeMethod(Menu::getInstance(), "isOptionChecked", Qt::BlockingQueuedConnection, | ||
| 70 | Q_RETURN_ARG(bool, result), | ||
| 71 | Q_ARG(const QString&, menuOption)); | ||
| 72 | return result; | ||
| 69 | } | 73 | } |
| 70 | 74 | ||
| 71 | void MenuScriptingInterface::setIsOptionChecked(const QString& menuOption, bool isChecked) { | 75 | void MenuScriptingInterface::setIsOptionChecked(const QString& menuOption, bool isChecked) { |
| 72 | return Menu::getInstance()->setIsOptionChecked(menuOption, isChecked); | 76 | QMetaObject::invokeMethod(Menu::getInstance(), "setIsOptionChecked", Qt::BlockingQueuedConnection, |
| 77 | Q_ARG(const QString&, menuOption), | ||
| 78 | Q_ARG(bool, isChecked)); | ||
| 73 | } | 79 | } |