History

Clear resource caches instead of restarting

Atlante45 committed 11 years ago

Commit ee3a8b11 parent ed296854 files · +19 −4Browse files

Showing the changes to libraries/networking/src/ResourceCache.cpp (1 of 4 files). Show all

Unified · Split

libraries/networking/src/ResourceCache.cpp+10−0
@@ -44,10 +44,20 @@ ResourceCache::~ResourceCache() { · 43 unmodified lines
44 }44 }
45}45}
46 46
47void ResourceCache::refreshAll() {
48 for (auto it = _resources.begin(); it != _resources.end(); ++it) {
49 if (!it.value().isNull()) {
50 it.value().data()->refresh();
51 }
52 }
53}
54
47void ResourceCache::refresh(const QUrl& url) {55void ResourceCache::refresh(const QUrl& url) {
48 QSharedPointer<Resource> resource = _resources.value(url);56 QSharedPointer<Resource> resource = _resources.value(url);
49 if (!resource.isNull()) {57 if (!resource.isNull()) {
50 resource->refresh();58 resource->refresh();
59 } else {
60 _resources.remove(url);
51 }61 }
52}62}
53 63

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