History

Adding more libs, ifdefs for android incompatible code

Bradley Austin Davis committed 8 years ago

Commit 9df9cf71 parent 0379eba33 files · +407 −104Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+3−3
@@ -1607,14 +1607,14 @@ QVariantMap ScriptEngine::fetchModuleSource(const QString& modulePath, const boo · 1606 unmodified lines
1607 if (!loader->isFinished()) {1607 if (!loader->isFinished()) {
1608 QTimer monitor;1608 QTimer monitor;
1609 QEventLoop loop;1609 QEventLoop loop;
1610 QObject::connect(loader, &BatchLoader::finished, this, [this, &monitor, &loop]{1610 QObject::connect(loader, &BatchLoader::finished, this, [&monitor, &loop]{
1611 monitor.stop();1611 monitor.stop();
1612 loop.quit();1612 loop.quit();
1613 });1613 });
1614 1614
1615 // this helps detect the case where stop() is invoked during the download1615 // this helps detect the case where stop() is invoked during the download
1616 // but not seen in time to abort processing in onload()...1616 // but not seen in time to abort processing in onload()...
1617 connect(&monitor, &QTimer::timeout, this, [this, &loop, &loader]{1617 connect(&monitor, &QTimer::timeout, this, [this, &loop]{
1618 if (isStopping()) {1618 if (isStopping()) {
1619 loop.exit(-1);1619 loop.exit(-1);
1620 }1620 }
@@ -2247,7 +2247,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 626 unmodified lines
2247 QTimer timeout;2247 QTimer timeout;
2248 timeout.setSingleShot(true);2248 timeout.setSingleShot(true);
2249 timeout.start(SANDBOX_TIMEOUT);2249 timeout.start(SANDBOX_TIMEOUT);
2250 connect(&timeout, &QTimer::timeout, [&sandbox, SANDBOX_TIMEOUT, scriptOrURL]{2250 connect(&timeout, &QTimer::timeout, [&sandbox, scriptOrURL]{
2251 qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout(" << scriptOrURL << ")";2251 qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout(" << scriptOrURL << ")";
2252 2252
2253 // Guard against infinite loops and non-performant code2253 // Guard against infinite loops and non-performant code