From 3d5fe22c25c305896393f14512523edf45384fae Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 3 Aug 2013 10:32:25 +0200 Subject: Fix unset icons in rekonq bookmarks page Icons set in bookmarks (eg: custom ones) are NOT rekonq responsability. So, if you don't have it we can do nothing about, sorry.. BUG: 321586 --- src/rekonqpage/newtabpage.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rekonqpage/newtabpage.cpp b/src/rekonqpage/newtabpage.cpp index 46220514..aded6f06 100644 --- a/src/rekonqpage/newtabpage.cpp +++ b/src/rekonqpage/newtabpage.cpp @@ -935,8 +935,8 @@ void NewTabPage::createBookmarkGroup(const KBookmark &bookmark, QWebElement pare void NewTabPage::createBookmarkItem(const KBookmark &bookmark, QWebElement parent) { QString cacheDir = QL1S("file://") + KStandardDirs::locateLocal("cache" , "" , true); - QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/mimetypes/text-html.png"); - + QString icon; + if (bookmark.isGroup()) { createBookmarkGroup(bookmark, m_root); @@ -952,7 +952,9 @@ void NewTabPage::createBookmarkItem(const KBookmark &bookmark, QWebElement paren QString b = bookmark.icon(); if (b.contains(QL1S("favicons"))) icon = cacheDir + bookmark.icon() + QL1S(".png"); - + else + icon = IconManager::self()->iconPathForUrl(bookmark.url()); + parent.appendInside(markup(QL1S("a"))); QWebElement bookmarkElement = parent.lastChild(); bookmarkElement.setAttribute(QL1S("href") , bookmark.url().prettyUrl()); -- cgit v1.2.1