summaryrefslogtreecommitdiff
path: root/src/history/historymodels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/history/historymodels.cpp')
-rw-r--r--src/history/historymodels.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/history/historymodels.cpp b/src/history/historymodels.cpp
index 709d0523..736dbcd7 100644
--- a/src/history/historymodels.cpp
+++ b/src/history/historymodels.cpp
@@ -118,6 +118,8 @@ QVariant HistoryModel::data(const QModelIndex &index, int role) const
return item.dateTime.date();
case UrlRole:
return QUrl(item.url);
+ case Qt::UserRole:
+ return KUrl(item.url);
case UrlStringRole:
return item.url;
case Qt::DisplayRole:
@@ -144,6 +146,12 @@ QVariant HistoryModel::data(const QModelIndex &index, int role) const
{
return Application::icon(item.url);
}
+ case Qt::ToolTipRole:
+ QString tooltip = "";
+ if(!item.title.isEmpty())
+ tooltip = item.title + "\n";
+ tooltip += item.dateTime.toString(Qt::SystemLocaleShortDate) + "\n" + item.url;
+ return tooltip;
}
return QVariant();
}