Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -775,6 +775,10 @@ void ScriptEngine::stopAllTimers() { · 774 unmodified lines | |||
| 775 | 775 | ||
| 776 | void ScriptEngine::stop() { | 776 | void ScriptEngine::stop() { |
| 777 | if (!_isFinished) { | 777 | if (!_isFinished) { |
| 778 | if (QThread::currentThread() != thread()) { | ||
| 779 | QMetaObject::invokeMethod(this, "stop"); | ||
| 780 | return; | ||
| 781 | } | ||
| 778 | _isFinished = true; | 782 | _isFinished = true; |
| 779 | if (_wantSignals) { | 783 | if (_wantSignals) { |
| 780 | emit runningStateChanged(); | 784 | emit runningStateChanged(); |