Showing the changes to libraries/script-engine/src/ScriptCache.cpp (1 of 5 files). Show all
Unified · Split
| @@ -26,7 +26,8 @@ ScriptCache::ScriptCache(QObject* parent) { · 25 unmodified lines | |||
| 26 | // nothing to do here... | 26 | // nothing to do here... |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | QString ScriptCache::getScript(const QUrl& url, ScriptUser* scriptUser, bool& isPending, bool reload) { | 29 | QString ScriptCache::getScript(const QUrl& unnormalizedURL, ScriptUser* scriptUser, bool& isPending, bool reload) { |
| 30 | QUrl url = ResourceManager::normalizeURL(unnormalizedURL); | ||
| 30 | QString scriptContents; | 31 | QString scriptContents; |
| 31 | if (_scriptCache.contains(url) && !reload) { | 32 | if (_scriptCache.contains(url) && !reload) { |
| 32 | qCDebug(scriptengine) << "Found script in cache:" << url.toString(); | 33 | qCDebug(scriptengine) << "Found script in cache:" << url.toString(); |
| @@ -50,7 +51,8 @@ QString ScriptCache::getScript(const QUrl& url, ScriptUser* scriptUser, bool& is · 17 unmodified lines | |||
| 50 | return scriptContents; | 51 | return scriptContents; |
| 51 | } | 52 | } |
| 52 | 53 | ||
| 53 | void ScriptCache::deleteScript(const QUrl& url) { | 54 | void ScriptCache::deleteScript(const QUrl& unnormalizedURL) { |
| 55 | QUrl url = ResourceManager::normalizeURL(unnormalizedURL); | ||
| 54 | if (_scriptCache.contains(url)) { | 56 | if (_scriptCache.contains(url)) { |
| 55 | qCDebug(scriptengine) << "Delete script from cache:" << url.toString(); | 57 | qCDebug(scriptengine) << "Delete script from cache:" << url.toString(); |
| 56 | _scriptCache.remove(url); | 58 | _scriptCache.remove(url); |