summaryrefslogtreecommitdiff
path: root/src/history
diff options
context:
space:
mode:
Diffstat (limited to 'src/history')
-rw-r--r--src/history/historymodels.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/history/historymodels.cpp b/src/history/historymodels.cpp
index 4888ca42..775aa320 100644
--- a/src/history/historymodels.cpp
+++ b/src/history/historymodels.cpp
@@ -137,24 +137,26 @@ QVariant HistoryModel::data(const QModelIndex &index, int role) const
case 1:
return item.url;
}
+ break;
}
case Qt::DecorationRole:
if (index.column() == 0)
{
return IconManager::self()->iconForUrl(item.url);
}
+ break;
case Qt::ToolTipRole:
- QString tooltip = "";
+ QString tooltip;
if (!item.title.isEmpty())
- tooltip = item.title + "<br/>";
+ tooltip = item.title + QL1S("<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 += QL1S("<center> <b>") + item.url + QL1S("</b> </center>");
+ tooltip += QL1S("<hr/>");
+ tooltip += i18n("First Visit: ") + firstVisit + QL1S("<br/>");
+ tooltip += i18n("Last Visit: ") + lastVisit + QL1S("<br/>");
tooltip += i18n("Number of Visits: ") + QString::number(visitCount);
return tooltip;