summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarkstreemodel.cpp
diff options
context:
space:
mode:
authorJon Ander Peñalba <jonan88@gmail.com>2010-08-20 16:12:39 +0200
committerJon Ander Peñalba <jonan88@gmail.com>2010-08-20 21:48:05 +0200
commitdd413ce2d00d4f484402384529161194605f7e5a (patch)
tree6ebce88d32ca799a26db7a09ebb64e2818ecf8ec /src/bookmarks/bookmarkstreemodel.cpp
parentChanged the name of the files src/bookmarks/bookmarksmanager.* to src/bookmar... (diff)
downloadrekonq-dd413ce2d00d4f484402384529161194605f7e5a.tar.xz
Removed unused includes in src/bookmarks/bookmarkprovider.h
Diffstat (limited to 'src/bookmarks/bookmarkstreemodel.cpp')
-rw-r--r--src/bookmarks/bookmarkstreemodel.cpp23
1 files changed, 13 insertions, 10 deletions
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 <KBookmarkManager>
+#include <KLocalizedString>
+
// Qt Includes
#include <QtCore/QMimeData>
@@ -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;
}