Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 42 files). Show all
Unified · Split
| @@ -711,7 +711,7 @@ bool externalResourceBucketFromScriptValue(const ScriptValue& object, ExternalRe · 710 unmodified lines | ||
| 711 | 711 | |
| 712 | 712 | void ScriptManager::resetModuleCache(bool deleteScriptCache) { |
| 713 | 713 | if (QThread::currentThread() != thread()) { |
| 714 | − executeOnScriptThread([=]() { resetModuleCache(deleteScriptCache); }); | |
| 714 | + executeOnScriptThread([=, this]() { resetModuleCache(deleteScriptCache); }); | |
| 715 | 715 | return; |
| 716 | 716 | } |
| 717 | 717 | auto jsRequire = _engine->globalObject().property("Script").property("require"); |
| @@ -1528,7 +1528,7 @@ QVariantMap ScriptManager::fetchModuleSource(const QString& modulePath, const bo · 810 unmodified lines | ||
| 1528 | 1528 | QVariantMap req; |
| 1529 | 1529 | qCDebug(scriptengine_module) << "require.fetchModuleSource: " << QUrl(modulePath).fileName() << QThread::currentThread(); |
| 1530 | 1530 | |
| 1531 | − auto onload = [=, &req](const UrlMap& data, const UrlMap& _status) { | |
| 1531 | + auto onload = [=, this, &req](const UrlMap& data, const UrlMap& _status) { | |
| 1532 | 1532 | auto url = modulePath; |
| 1533 | 1533 | auto status = _status[url]; |
| 1534 | 1534 | auto contents = data[url]; |
| @@ -1780,7 +1780,7 @@ void ScriptManager::include(const QStringList& includeFiles, const ScriptValue& · 245 unmodified lines | ||
| 1780 | 1780 | EntityItemID capturedEntityIdentifier = currentEntityIdentifier; |
| 1781 | 1781 | QUrl capturedSandboxURL = currentSandboxURL; |
| 1782 | 1782 | |
| 1783 | − auto evaluateScripts = [=](const QMap<QUrl, QString>& data, const QMap<QUrl, QString>& status) { | |
| 1783 | + auto evaluateScripts = [=, this](const QMap<QUrl, QString>& data, const QMap<QUrl, QString>& status) { | |
| 1784 | 1784 | auto parentURL = _parentURL; |
| 1785 | 1785 | for (QUrl url : urls) { |
| 1786 | 1786 | QString contents = data[url]; |
| @@ -2081,7 +2081,7 @@ void ScriptManager::loadEntityScript(const EntityItemID& entityID, const QString · 294 unmodified lines | ||
| 2081 | 2081 | #endif |
| 2082 | 2082 | return; |
| 2083 | 2083 | } |
| 2084 | − executeOnScriptThread([=]{ | |
| 2084 | + executeOnScriptThread([=, this]{ | |
| 2085 | 2085 | #ifdef DEBUG_ENTITY_STATES |
| 2086 | 2086 | qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << entityID.toString(); |
| 2087 | 2087 | #endif |