summaryrefslogtreecommitdiff
path: root/src/icons/iconmanager.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-12-15 21:29:36 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-12-15 21:29:36 +0100
commit501871d0c4155336f5ebe3842c7d0d453fc69ad8 (patch)
tree1f8bd7461a2f7f8d4a1a2524adc571b497119946 /src/icons/iconmanager.cpp
parentFix && uniform UI width (diff)
downloadrekonq-501871d0c4155336f5ebe3842c7d0d453fc69ad8.tar.xz
Get sure we try downloading just once engine favicon(s)...
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");