Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 45 files). Show all
Unified · Split
| @@ -36,6 +36,7 @@ · 35 unmodified lines | ||
| 36 | 36 | |
| 37 | 37 | #include <QtScriptTools/QScriptEngineDebugger> |
| 38 | 38 | |
| 39 | +#include <shared/QtHelpers.h> | |
| 39 | 40 | #include <AudioConstants.h> |
| 40 | 41 | #include <AudioEffectOptions.h> |
| 41 | 42 | #include <AvatarData.h> |
| @@ -436,12 +437,12 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { · 394 unmodified lines | ||
| 436 | 437 | _fileNameString = url.toString(); |
| 437 | 438 | _isReloading = reload; |
| 438 | 439 | |
| 439 | − // Check that script has a supported file extension | |
| 440 | + // Check that script has a supported file extension | |
| 440 | 441 | if (!hasValidScriptSuffix(_fileNameString)) { |
| 441 | 442 | scriptErrorMessage("File extension of file: " + _fileNameString + " is not a currently supported script type"); |
| 442 | 443 | emit errorLoadingScript(_fileNameString); |
| 443 | 444 | return; |
| 444 | − } | |
| 445 | + } | |
| 445 | 446 | |
| 446 | 447 | const auto maxRetries = 0; // for consistency with previous scriptCache->getScript() behavior |
| 447 | 448 | auto scriptCache = DependencyManager::get<ScriptCache>(); |
| @@ -964,7 +965,7 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi · 516 unmodified lines | ||
| 964 | 965 | qCDebug(scriptengine) << "*** WARNING *** ScriptEngine::evaluate() called on wrong thread [" << QThread::currentThread() << "], invoking on correct thread [" << thread() << "] " |
| 965 | 966 | "sourceCode:" << sourceCode << " fileName:" << fileName << "lineNumber:" << lineNumber; |
| 966 | 967 | #endif |
| 967 | − QMetaObject::invokeMethod(this, "evaluate", Qt::BlockingQueuedConnection, | |
| 968 | + hifi::qt::blockingInvokeMethod(this, "evaluate", | |
| 968 | 969 | Q_RETURN_ARG(QScriptValue, result), |
| 969 | 970 | Q_ARG(const QString&, sourceCode), |
| 970 | 971 | Q_ARG(const QString&, fileName), |