summaryrefslogtreecommitdiff
path: root/src/history
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2011-11-28 23:24:02 +0100
committerYoann Laissus <yoann.laissus@gmail.com>2011-11-28 23:27:21 +0100
commit041d50a21a43ee934b9064cc421fccda4b05f658 (patch)
treeb0dff520373bb3fd352c79d537e856737d24df16 /src/history
parentShortcut + slot to open downloads page (in a new focused tab) (diff)
downloadrekonq-041d50a21a43ee934b9064cc421fccda4b05f658.tar.xz
GCI Task : Improve tooltips of the history panel items
Patch by by Hüseyin Zengin, Thanks! REVIEW: 103256
Diffstat (limited to 'src/history')
-rw-r--r--src/history/historymodels.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/history/historymodels.cpp b/src/history/historymodels.cpp
index ed5eee20..cb8ee20c 100644
--- a/src/history/historymodels.cpp
+++ b/src/history/historymodels.cpp
@@ -153,8 +153,17 @@ QVariant HistoryModel::data(const QModelIndex &index, int role) const
case Qt::ToolTipRole:
QString tooltip = "";
if (!item.title.isEmpty())
- tooltip = item.title + '\n';
- tooltip += item.lastDateTimeVisit.toString(Qt::SystemLocaleShortDate) + '\n' + item.url;
+ tooltip = item.title + "<br/>";
+
+ QString lastVisit = item.firstDateTimeVisit.toString(Qt::SystemLocaleDate);
+ QString firstVisit = item.lastDateTimeVisit.toString(Qt::SystemLocaleDate);
+ int visitCount = item.visitCount;
+ tooltip += "<center> <b>" + item.url + "</b> </center>";
+ tooltip += "<hr/>";
+ tooltip += i18n("First Visit: ") + firstVisit + "<br/>";
+ tooltip += i18n("Last Visit: ") + lastVisit + "<br/>";
+ tooltip += i18n("Number of Visits: ") + QString::number(visitCount);
+
return tooltip;
}
return QVariant();