Showing the changes to libraries/script-engine/src/ScriptCache.cpp (1 of 7 files). Show all
Unified · Split
| @@ -27,6 +27,11 @@ ScriptCache::ScriptCache(QObject* parent) { · 26 unmodified lines | |||
| 27 | // nothing to do here... | 27 | // nothing to do here... |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | void ScriptCache::clearCache() { | ||
| 31 | _scriptCache.clear(); | ||
| 32 | } | ||
| 33 | |||
| 34 | |||
| 30 | QString ScriptCache::getScript(const QUrl& unnormalizedURL, ScriptUser* scriptUser, bool& isPending, bool reload) { | 35 | QString ScriptCache::getScript(const QUrl& unnormalizedURL, ScriptUser* scriptUser, bool& isPending, bool reload) { |
| 31 | QUrl url = ResourceManager::normalizeURL(unnormalizedURL); | 36 | QUrl url = ResourceManager::normalizeURL(unnormalizedURL); |
| 32 | QString scriptContents; | 37 | QString scriptContents; |
| @@ -95,6 +100,8 @@ void ScriptCache::getScriptContents(const QString& scriptOrURL, contentAvailable · 62 unmodified lines | |||
| 95 | return; | 100 | return; |
| 96 | } | 101 | } |
| 97 | 102 | ||
| 103 | qCDebug(scriptengine) << "ScriptCache::getScriptContents() scriptOrURL:" << scriptOrURL << " forceDownload:" << forceDownload << " on thread[" << QThread::currentThread() << "] expected thread[" << thread() << "]"; | ||
| 104 | |||
| 98 | if (_scriptCache.contains(url) && !forceDownload) { | 105 | if (_scriptCache.contains(url) && !forceDownload) { |
| 99 | qCDebug(scriptengine) << "Found script in cache:" << url.toString(); | 106 | qCDebug(scriptengine) << "Found script in cache:" << url.toString(); |
| 100 | #if 1 // def THREAD_DEBUGGING | 107 | #if 1 // def THREAD_DEBUGGING |