From 94296c27926dd3d6d9267e088153d527e8ff122b Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 10 Sep 2010 03:53:37 +0200 Subject: Reimplemented the clearIconCache method --- src/iconmanager.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/iconmanager.cpp') 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 // Qt Includes +#include + #include #include #include @@ -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); + } +} -- cgit v1.2.1