Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 312 files). Show all
Unified · Split
| @@ -271,7 +271,7 @@ void ScriptEngine::disconnectNonEssentialSignals() { · 270 unmodified lines | |||
| 271 | // Ensure the thread should be running, and does exist | 271 | // Ensure the thread should be running, and does exist |
| 272 | if (_isRunning && _isThreaded && (workerThread = thread())) { | 272 | if (_isRunning && _isThreaded && (workerThread = thread())) { |
| 273 | connect(this, &ScriptEngine::doneRunning, workerThread, &QThread::quit); | 273 | connect(this, &ScriptEngine::doneRunning, workerThread, &QThread::quit); |
| 274 | connect(this, &QObject::destroyed, workerThread, &QObject::deleteLater); | 274 | connect(workerThread, &QThread::finished, workerThread, &QObject::deleteLater); |
| 275 | } | 275 | } |
| 276 | } | 276 | } |
| 277 | 277 | ||
| @@ -386,7 +386,7 @@ void ScriptEngine::runInThread() { · 108 unmodified lines | |||
| 386 | // disconnectNonEssentialSignals() method | 386 | // disconnectNonEssentialSignals() method |
| 387 | connect(workerThread, &QThread::started, this, &ScriptEngine::run); | 387 | connect(workerThread, &QThread::started, this, &ScriptEngine::run); |
| 388 | connect(this, &ScriptEngine::doneRunning, workerThread, &QThread::quit); | 388 | connect(this, &ScriptEngine::doneRunning, workerThread, &QThread::quit); |
| 389 | connect(this, &QObject::destroyed, workerThread, &QObject::deleteLater); | 389 | connect(workerThread, &QThread::finished, workerThread, &QObject::deleteLater); |
| 390 | 390 | ||
| 391 | workerThread->start(); | 391 | workerThread->start(); |
| 392 | } | 392 | } |