History

Merge branch 'master' of github.com:highfidelity/hifi into fix/shutdown

Zach Pomerantz committed 10 years ago

Commit 59e4b9c2 parents 13610b1 987b348194 files · +3212 −1716Browse files

Showing the changes to libraries/script-engine/src/ScriptEngines.cpp (1 of 194 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngines.cpp+10−4
@@ -9,7 +9,8 @@ · 8 unmodified lines
99 #include "ScriptEngines.h"
1010
1111 #include <QtCore/QStandardPaths>
12−#include <QtCore/QCoreApplication>
12+
13+#include <QtWidgets/QApplication>
1314
1415 #include <SettingHandle.h>
1516 #include <UserActivityLogger.h>
@@ -269,12 +270,12 @@ void ScriptEngines::loadOneScript(const QString& scriptFilename) { · 253 unmodified lines
269270
270271 void ScriptEngines::loadScripts() {
271272 // check first run...
272− if (_firstRun.get()) {
273+ Setting::Handle<bool> firstRun { Settings::firstRun, true };
274+ if (firstRun.get()) {
273275 qCDebug(scriptengine) << "This is a first run...";
274276 // clear the scripts, and set out script to our default scripts
275277 clearScripts();
276278 loadDefaultScripts();
277− _firstRun.set(false);
278279 return;
279280 }
280281
@@ -489,7 +490,12 @@ void ScriptEngines::launchScriptEngine(ScriptEngine* scriptEngine) { · 208 unmodified lines
489490 for (auto initializer : _scriptInitializers) {
490491 initializer(scriptEngine);
491492 }
492− scriptEngine->runInThread();
493+
494+ if (scriptEngine->isDebuggable() || (qApp->queryKeyboardModifiers() & Qt::ShiftModifier)) {
495+ scriptEngine->runDebuggable();
496+ } else {
497+ scriptEngine->runInThread();
498+ }
493499 }
494500
495501