diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-08-30 18:53:04 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-08-30 18:53:04 +0200 |
commit | 578c3a471efc2c275df447796db5881efd19e0f7 (patch) | |
tree | 8e3084bc27b6b752d522edb997fc6e6fbe2ff2c5 /src/iconmanager.cpp | |
parent | Merge commit 'refs/merge-requests/193' of git://gitorious.org/rekonq/mainline... (diff) | |
download | rekonq-578c3a471efc2c275df447796db5881efd19e0f7.tar.xz |
Folder icons for local files
Diffstat (limited to 'src/iconmanager.cpp')
-rw-r--r-- | src/iconmanager.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp index 694af6a5..4381b53a 100644 --- a/src/iconmanager.cpp +++ b/src/iconmanager.cpp @@ -35,6 +35,8 @@ // KDE Includes #include <kmimetype.h> #include <KStandardDirs> +#include <KFileItem> +#include <KDirLister> // Qt Includes #include <QDBusInterface> @@ -83,7 +85,12 @@ KIcon IconManager::iconForUrl(const KUrl &url) return KIcon(faviconDir + i); } kDebug() << "Icon NOT Found. returning text-html one"; - + + // TODO: return other mimetype icons + if(url.isLocalFile()) + { + return KIcon("folder"); + } return KIcon("text-html"); } @@ -95,6 +102,7 @@ void IconManager::provideIcon(QWebPage *page, const KUrl &url, bool notify) kDebug() << "URL: " << url << ". about scheme. Aborting..."; return; } + QUrl u(url.url()); QString rootUrlString = u.toString( QUrl::RemovePassword | QUrl::RemoveUserInfo |