summaryrefslogtreecommitdiff
path: root/src/icons/iconmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/icons/iconmanager.cpp')
-rw-r--r--src/icons/iconmanager.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/icons/iconmanager.cpp b/src/icons/iconmanager.cpp
index 7bc47eec..0a1645d7 100644
--- a/src/icons/iconmanager.cpp
+++ b/src/icons/iconmanager.cpp
@@ -209,12 +209,20 @@ QString IconManager::iconPathForUrl(const KUrl &url)
KIcon IconManager::engineFavicon(const KUrl &url)
{
- if (QFile::exists(_faviconsDir + url.host() + QL1S(".png")))
- return KIcon(QIcon(_faviconsDir + url.host() + QL1S(".png")));
+ QString h = url.host();
+ if (QFile::exists(_faviconsDir + h + QL1S(".png")))
+ {
+ _engineFaviconHosts.removeAll(h);
+ return KIcon(QIcon(_faviconsDir + h + QL1S(".png")));
+ }
// if engine favicon is NOT found, download it
// will autodelete itself when done
- new WebIcon(url);
+ if (!_engineFaviconHosts.contains(h))
+ {
+ _engineFaviconHosts << h;
+ new WebIcon(url);
+ }
kDebug() << "NO ENGINE FAVICON";
return KIcon("text-html");