summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-08-03 10:32:25 +0200
committerAndrea Diamantini <adjam7@gmail.com>2013-08-03 10:32:25 +0200
commit3d5fe22c25c305896393f14512523edf45384fae (patch)
tree283a5badfd936c0fe614bff1809498856b5daf14
parentLoad an empty session if no saved one is found (diff)
downloadrekonq-3d5fe22c25c305896393f14512523edf45384fae.tar.xz
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
-rw-r--r--src/rekonqpage/newtabpage.cpp8
1 files 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());