History

add reload all support for entity scripts

Brad Hefta-Gaub committed 11 years ago

Commit 248107c1 parent e1cb0417 files · +30 −3Browse files

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

Unified · Split

libraries/script-engine/src/ScriptCache.cpp+7−0
@@ -27,6 +27,11 @@ ScriptCache::ScriptCache(QObject* parent) { · 26 unmodified lines
2727 // nothing to do here...
2828 }
2929
30+void ScriptCache::clearCache() {
31+ _scriptCache.clear();
32+}
33+
34+
3035 QString ScriptCache::getScript(const QUrl& unnormalizedURL, ScriptUser* scriptUser, bool& isPending, bool reload) {
3136 QUrl url = ResourceManager::normalizeURL(unnormalizedURL);
3237 QString scriptContents;
@@ -95,6 +100,8 @@ void ScriptCache::getScriptContents(const QString& scriptOrURL, contentAvailable · 62 unmodified lines
95100 return;
96101 }
97102
103+ qCDebug(scriptengine) << "ScriptCache::getScriptContents() scriptOrURL:" << scriptOrURL << " forceDownload:" << forceDownload << " on thread[" << QThread::currentThread() << "] expected thread[" << thread() << "]";
104+
98105 if (_scriptCache.contains(url) && !forceDownload) {
99106 qCDebug(scriptengine) << "Found script in cache:" << url.toString();
100107 #if 1 // def THREAD_DEBUGGING

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t