History

Display resource-access events in marketplace item tester

Includes refactoring marketplace item tester into a single-page app.

Kerry Ivan Kurian committed 8 years ago

Commit 3b155481 parent 8e5bc1639 files · +846 −383Browse files

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

Unified · Split

libraries/script-engine/src/ScriptCache.cpp+4−2
@@ -109,7 +109,8 @@ void ScriptCache::getScriptContents(const QString& scriptOrURL, contentAvailable · 108 unmodified lines
109 #ifdef THREAD_DEBUGGING109 #ifdef THREAD_DEBUGGING
110 qCDebug(scriptengine) << "about to call: ResourceManager::createResourceRequest(this, url); on thread [" << QThread::currentThread() << "] expected thread [" << thread() << "]";110 qCDebug(scriptengine) << "about to call: ResourceManager::createResourceRequest(this, url); on thread [" << QThread::currentThread() << "] expected thread [" << thread() << "]";
111 #endif111 #endif
112 auto request = DependencyManager::get<ResourceManager>()->createResourceRequest(nullptr, url);112 auto request = DependencyManager::get<ResourceManager>()->createResourceRequest(
113 nullptr, url, true, -1, "ScriptCache::getScriptContents");
113 Q_ASSERT(request);114 Q_ASSERT(request);
114 request->setCacheEnabled(!forceDownload);115 request->setCacheEnabled(!forceDownload);
115 connect(request, &ResourceRequest::finished, this, [=]{ scriptContentAvailable(maxRetries); });116 connect(request, &ResourceRequest::finished, this, [=]{ scriptContentAvailable(maxRetries); });
@@ -166,7 +167,8 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { · 50 unmodified lines
166 qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]: %3")167 qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]: %3")
167 .arg(attempt).arg(maxRetries).arg(url.toString());168 .arg(attempt).arg(maxRetries).arg(url.toString());
168 169
169 auto request = DependencyManager::get<ResourceManager>()->createResourceRequest(nullptr, url);170 auto request = DependencyManager::get<ResourceManager>()->createResourceRequest(
171 nullptr, url, true, -1, "ScriptCache::scriptContentAvailable");
170 Q_ASSERT(request);172 Q_ASSERT(request);
171 173
172 // We've already made a request, so the cache must be disabled or it wasn't there, so enabling174 // We've already made a request, so the cache must be disabled or it wasn't there, so enabling