summaryrefslogtreecommitdiff
path: root/src/iconmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/iconmanager.cpp')
-rw-r--r--src/iconmanager.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp
index 3829776d..f8d1a6a4 100644
--- a/src/iconmanager.cpp
+++ b/src/iconmanager.cpp
@@ -41,6 +41,8 @@
#include <KUrl>
// Qt Includes
+#include <QtCore/QDir>
+
#include <QtWebKit/QWebElement>
#include <QtWebKit/QWebFrame>
#include <QtWebKit/QWebSettings>
@@ -173,3 +175,15 @@ void IconManager::downloadIconFromUrl(const KUrl &url)
{
new WebIcon(url, this);
}
+
+
+void IconManager::clearIconCache()
+{
+ QString faviconDir = KStandardDirs::locateLocal("cache" , "favicons/" , true);
+ QDir d(faviconDir);
+ QStringList favicons = d.entryList();
+ Q_FOREACH(const QString &fav, favicons)
+ {
+ d.remove(fav);
+ }
+}