Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1506,7 +1506,7 @@ void ScriptEngine::processDeferredEntityLoads(const QString& entityScript, const · 1505 unmodified lines | |||
| 1506 | i.remove(); | 1506 | i.remove(); |
| 1507 | } | 1507 | } |
| 1508 | } | 1508 | } |
| 1509 | foreach(auto &retry, retryLoads) { | 1509 | foreach(DeferredLoadEntity retry, retryLoads) { |
| 1510 | // check whether entity was since been deleted | 1510 | // check whether entity was since been deleted |
| 1511 | if (!_entityScripts.contains(retry.entityID)) { | 1511 | if (!_entityScripts.contains(retry.entityID)) { |
| 1512 | qCDebug(scriptengine) << "processDeferredEntityLoads -- entity details gone (entity deleted?)" | 1512 | qCDebug(scriptengine) << "processDeferredEntityLoads -- entity details gone (entity deleted?)" |
| @@ -1528,7 +1528,7 @@ void ScriptEngine::processDeferredEntityLoads(const QString& entityScript, const · 15 unmodified lines | |||
| 1528 | qCDebug(scriptengine) << QString("... pending load of %1 cancelled (leader: %2 status: %3)") | 1528 | qCDebug(scriptengine) << QString("... pending load of %1 cancelled (leader: %2 status: %3)") |
| 1529 | .arg(retry.entityID.toString()).arg(leaderID.toString()).arg(leaderDetails.status); | 1529 | .arg(retry.entityID.toString()).arg(leaderID.toString()).arg(leaderDetails.status); |
| 1530 | 1530 | ||
| 1531 | auto extraDetail = "\n(propagated from " + leaderID.toString() + ")"; | 1531 | auto extraDetail = QString("\n(propagated from %1)").arg(leaderID.toString()); |
| 1532 | if (leaderDetails.status == EntityScriptStatus::ERROR_LOADING_SCRIPT || | 1532 | if (leaderDetails.status == EntityScriptStatus::ERROR_LOADING_SCRIPT || |
| 1533 | leaderDetails.status == EntityScriptStatus::ERROR_RUNNING_SCRIPT) { | 1533 | leaderDetails.status == EntityScriptStatus::ERROR_RUNNING_SCRIPT) { |
| 1534 | // propagate same error so User doesn't have to hunt down stampede's leader | 1534 | // propagate same error so User doesn't have to hunt down stampede's leader |
| @@ -1599,7 +1599,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 64 unmodified lines | |||
| 1599 | // another entity is busy loading from this script URL so wait for them to finish | 1599 | // another entity is busy loading from this script URL so wait for them to finish |
| 1600 | #ifdef DEBUG_ENTITY_STATES | 1600 | #ifdef DEBUG_ENTITY_STATES |
| 1601 | qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 script: %2 (waiting on %3)") | 1601 | qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 script: %2 (waiting on %3)") |
| 1602 | .arg( _deferredEntityLoads.size()).arg(entityID.toString()).arg(entityScript).arg(currentEntityID.toString()); | 1602 | .arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(entityScript).arg(currentEntityID.toString()); |
| 1603 | #endif | 1603 | #endif |
| 1604 | _deferredEntityLoads.push_back({ entityID, entityScript }); | 1604 | _deferredEntityLoads.push_back({ entityID, entityScript }); |
| 1605 | return; | 1605 | return; |
| @@ -1679,7 +1679,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 73 unmodified lines | |||
| 1679 | auto fileName = isURL ? scriptOrURL : "about:EmbeddedEntityScript"; | 1679 | auto fileName = isURL ? scriptOrURL : "about:EmbeddedEntityScript"; |
| 1680 | 1680 | ||
| 1681 | const EntityScriptDetails &oldDetails = _entityScripts[entityID]; | 1681 | const EntityScriptDetails &oldDetails = _entityScripts[entityID]; |
| 1682 | const auto entityScript = oldDetails.scriptText; | 1682 | const QString entityScript = oldDetails.scriptText; |
| 1683 | 1683 | ||
| 1684 | EntityScriptDetails newDetails; | 1684 | EntityScriptDetails newDetails; |
| 1685 | newDetails.scriptText = scriptOrURL; | 1685 | newDetails.scriptText = scriptOrURL; |
| @@ -1852,7 +1852,7 @@ void ScriptEngine::unloadEntityScript(const EntityItemID& entityID) { · 166 unmodified lines | |||
| 1852 | #endif | 1852 | #endif |
| 1853 | 1853 | ||
| 1854 | if (_entityScripts.contains(entityID)) { | 1854 | if (_entityScripts.contains(entityID)) { |
| 1855 | auto oldDetails = _entityScripts[entityID]; | 1855 | const EntityScriptDetails &oldDetails = _entityScripts[entityID]; |
| 1856 | if (isEntityScriptRunning(entityID)) { | 1856 | if (isEntityScriptRunning(entityID)) { |
| 1857 | callEntityScriptMethod(entityID, "unload"); | 1857 | callEntityScriptMethod(entityID, "unload"); |
| 1858 | } else { | 1858 | } else { |