From d002e3ede6b703b1e561a64c8f8ca9017ef87049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Ander=20Pe=C3=B1alba?= Date: Fri, 20 Aug 2010 21:42:38 +0200 Subject: Changed the name of the files src/bookmarks/bookmarksmanager.* to src/bookmarks/bookmarkprovider.* --- src/bookmarks/bookmarkstreemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bookmarks/bookmarkstreemodel.cpp') diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp index 7f0bf66f..14b9c734 100644 --- a/src/bookmarks/bookmarkstreemodel.cpp +++ b/src/bookmarks/bookmarkstreemodel.cpp @@ -30,7 +30,7 @@ // Local Includes #include "application.h" -#include "bookmarksmanager.h" +#include "bookmarkprovider.h" // Qt Includes #include -- cgit v1.2.1 From dd413ce2d00d4f484402384529161194605f7e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Ander=20Pe=C3=B1alba?= Date: Fri, 20 Aug 2010 16:12:39 +0200 Subject: Removed unused includes in src/bookmarks/bookmarkprovider.h --- src/bookmarks/bookmarkstreemodel.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/bookmarks/bookmarkstreemodel.cpp') diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp index 14b9c734..ee19daf1 100644 --- a/src/bookmarks/bookmarkstreemodel.cpp +++ b/src/bookmarks/bookmarkstreemodel.cpp @@ -32,6 +32,10 @@ #include "application.h" #include "bookmarkprovider.h" +// KDE Includes +#include +#include + // Qt Includes #include @@ -56,28 +60,27 @@ QVariant BtmItem::data(int role) const if (role == Qt::DisplayRole) return m_kbm.text(); + if (role == Qt::DecorationRole) return KIcon(m_kbm.icon()); + if (role == Qt::UserRole) return m_kbm.url(); + if (role == Qt::ToolTipRole) { - QString tooltip = ""; - - if (!m_kbm.fullText().isEmpty()) - { - tooltip += m_kbm.fullText(); - } + QString tooltip = m_kbm.fullText(); if (m_kbm.isGroup()) - { tooltip += i18ncp("%1=Number of items in bookmark folder", " (1 item)", " (%1 items)", childCount()); - } - if (!m_kbm.url().url().isEmpty()) + + QString url = m_kbm.url().url(); + if (!url.isEmpty()) { if (!tooltip.isEmpty()) tooltip += '\n'; - tooltip += m_kbm.url().url(); + tooltip += url; } + return tooltip; } -- cgit v1.2.1