Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -7507,7 +7507,11 @@ void Application::registerScriptEngineWithApplicationServices(const ScriptEngine · 7506 unmodified lines | |||
| 7507 | if (clientScript) { | 7507 | if (clientScript) { |
| 7508 | scriptEngine->registerGlobalObject("Desktop", DependencyManager::get<DesktopScriptingInterface>().data()); | 7508 | scriptEngine->registerGlobalObject("Desktop", DependencyManager::get<DesktopScriptingInterface>().data()); |
| 7509 | } else { | 7509 | } else { |
| 7510 | scriptEngine->registerGlobalObject("Desktop", new DesktopScriptingInterface(scriptEngine.get(), true)); | 7510 | auto desktopScriptingInterface = new DesktopScriptingInterface(nullptr, true); |
| 7511 | scriptEngine->registerGlobalObject("Desktop", desktopScriptingInterface); | ||
| 7512 | if (QThread::currentThread() != thread()) { | ||
| 7513 | desktopScriptingInterface->moveToThread(thread()); | ||
| 7514 | } | ||
| 7511 | } | 7515 | } |
| 7512 | #endif | 7516 | #endif |
| 7513 | 7517 | ||