Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 4 files). Show all
Unified · Split
| @@ -754,7 +754,7 @@ void ScriptEngine::addEventHandler(const EntityItemID& entityID, const QString& · 753 unmodified lines | ||
| 754 | 754 | |
| 755 | 755 | |
| 756 | 756 | QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fileName, int lineNumber) { |
| 757 | − if (DependencyManager::get<ScriptEngines>()->_stopped) { | |
| 757 | + if (DependencyManager::get<ScriptEngines>()->isStopped()) { | |
| 758 | 758 | return QScriptValue(); // bail early |
| 759 | 759 | } |
| 760 | 760 | |
| @@ -790,7 +790,7 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi · 29 unmodified lines | ||
| 790 | 790 | } |
| 791 | 791 | |
| 792 | 792 | void ScriptEngine::run() { |
| 793 | − if (DependencyManager::get<ScriptEngines>()->_stopped) { | |
| 793 | + if (DependencyManager::get<ScriptEngines>()->isStopped()) { | |
| 794 | 794 | return; // bail early - avoid setting state in init(), as evaluate() will bail too |
| 795 | 795 | } |
| 796 | 796 | |
| @@ -1023,7 +1023,7 @@ QObject* ScriptEngine::setupTimerWithInterval(const QScriptValue& function, int · 226 unmodified lines | ||
| 1023 | 1023 | } |
| 1024 | 1024 | |
| 1025 | 1025 | QObject* ScriptEngine::setInterval(const QScriptValue& function, int intervalMS) { |
| 1026 | − if (DependencyManager::get<ScriptEngines>()->_stopped) { | |
| 1026 | + if (DependencyManager::get<ScriptEngines>()->isStopped()) { | |
| 1027 | 1027 | qCDebug(scriptengine) << "Script.setInterval() while shutting down is ignored... parent script:" << getFilename(); |
| 1028 | 1028 | return NULL; // bail early |
| 1029 | 1029 | } |
| @@ -1032,7 +1032,7 @@ QObject* ScriptEngine::setInterval(const QScriptValue& function, int intervalMS) · 2 unmodified lines | ||
| 1032 | 1032 | } |
| 1033 | 1033 | |
| 1034 | 1034 | QObject* ScriptEngine::setTimeout(const QScriptValue& function, int timeoutMS) { |
| 1035 | − if (DependencyManager::get<ScriptEngines>()->_stopped) { | |
| 1035 | + if (DependencyManager::get<ScriptEngines>()->isStopped()) { | |
| 1036 | 1036 | qCDebug(scriptengine) << "Script.setTimeout() while shutting down is ignored... parent script:" << getFilename(); |
| 1037 | 1037 | return NULL; // bail early |
| 1038 | 1038 | } |
| @@ -1084,7 +1084,7 @@ void ScriptEngine::print(const QString& message) { · 45 unmodified lines | ||
| 1084 | 1084 | // If no callback is specified, the included files will be loaded synchronously and will block execution until |
| 1085 | 1085 | // all of the files have finished loading. |
| 1086 | 1086 | void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callback) { |
| 1087 | − if (DependencyManager::get<ScriptEngines>()->_stopped) { | |
| 1087 | + if (DependencyManager::get<ScriptEngines>()->isStopped()) { | |
| 1088 | 1088 | qCDebug(scriptengine) << "Script.include() while shutting down is ignored..." |
| 1089 | 1089 | << "includeFiles:" << includeFiles << "parent script:" << getFilename(); |
| 1090 | 1090 | return; // bail early |
| @@ -1182,7 +1182,7 @@ void ScriptEngine::include(const QStringList& includeFiles, QScriptValue callbac · 91 unmodified lines | ||
| 1182 | 1182 | } |
| 1183 | 1183 | |
| 1184 | 1184 | void ScriptEngine::include(const QString& includeFile, QScriptValue callback) { |
| 1185 | − if (DependencyManager::get<ScriptEngines>()->_stopped) { | |
| 1185 | + if (DependencyManager::get<ScriptEngines>()->isStopped()) { | |
| 1186 | 1186 | qCDebug(scriptengine) << "Script.include() while shutting down is ignored... " |
| 1187 | 1187 | << "includeFile:" << includeFile << "parent script:" << getFilename(); |
| 1188 | 1188 | return; // bail early |
| @@ -1197,7 +1197,7 @@ void ScriptEngine::include(const QString& includeFile, QScriptValue callback) { · 8 unmodified lines | ||
| 1197 | 1197 | // as a stand-alone script. To accomplish this, the ScriptEngine class just emits a signal which |
| 1198 | 1198 | // the Application or other context will connect to in order to know to actually load the script |
| 1199 | 1199 | void ScriptEngine::load(const QString& loadFile) { |
| 1200 | − if (DependencyManager::get<ScriptEngines>()->_stopped) { | |
| 1200 | + if (DependencyManager::get<ScriptEngines>()->isStopped()) { | |
| 1201 | 1201 | qCDebug(scriptengine) << "Script.load() while shutting down is ignored... " |
| 1202 | 1202 | << "loadFile:" << loadFile << "parent script:" << getFilename(); |
| 1203 | 1203 | return; // bail early |