Showing the changes to libraries/script-engine/src/ScriptEngines.cpp (1 of 194 files). Show all
Unified · Split
| @@ -9,7 +9,8 @@ · 8 unmodified lines | |||
| 9 | #include "ScriptEngines.h" | 9 | #include "ScriptEngines.h" |
| 10 | 10 | ||
| 11 | #include <QtCore/QStandardPaths> | 11 | #include <QtCore/QStandardPaths> |
| 12 | #include <QtCore/QCoreApplication> | 12 | |
| 13 | #include <QtWidgets/QApplication> | ||
| 13 | 14 | ||
| 14 | #include <SettingHandle.h> | 15 | #include <SettingHandle.h> |
| 15 | #include <UserActivityLogger.h> | 16 | #include <UserActivityLogger.h> |
| @@ -269,12 +270,12 @@ void ScriptEngines::loadOneScript(const QString& scriptFilename) { · 253 unmodified lines | |||
| 269 | 270 | ||
| 270 | void ScriptEngines::loadScripts() { | 271 | void ScriptEngines::loadScripts() { |
| 271 | // check first run... | 272 | // check first run... |
| 272 | if (_firstRun.get()) { | 273 | Setting::Handle<bool> firstRun { Settings::firstRun, true }; |
| 274 | if (firstRun.get()) { | ||
| 273 | qCDebug(scriptengine) << "This is a first run..."; | 275 | qCDebug(scriptengine) << "This is a first run..."; |
| 274 | // clear the scripts, and set out script to our default scripts | 276 | // clear the scripts, and set out script to our default scripts |
| 275 | clearScripts(); | 277 | clearScripts(); |
| 276 | loadDefaultScripts(); | 278 | loadDefaultScripts(); |
| 277 | _firstRun.set(false); | ||
| 278 | return; | 279 | return; |
| 279 | } | 280 | } |
| 280 | 281 | ||
| @@ -489,7 +490,12 @@ void ScriptEngines::launchScriptEngine(ScriptEngine* scriptEngine) { · 208 unmodified lines | |||
| 489 | for (auto initializer : _scriptInitializers) { | 490 | for (auto initializer : _scriptInitializers) { |
| 490 | initializer(scriptEngine); | 491 | initializer(scriptEngine); |
| 491 | } | 492 | } |
| 492 | scriptEngine->runInThread(); | 493 | |
| 494 | if (scriptEngine->isDebuggable() || (qApp->queryKeyboardModifiers() & Qt::ShiftModifier)) { | ||
| 495 | scriptEngine->runDebuggable(); | ||
| 496 | } else { | ||
| 497 | scriptEngine->runInThread(); | ||
| 498 | } | ||
| 493 | } | 499 | } |
| 494 | 500 | ||
| 495 | 501 | ||