From c44d46e15dfc3af21d64c6b54466760e98b17bf3 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 30 Sep 2021 13:28:08 +0200 Subject: [PATCH] tooltips for all cells in msg list --- src/librssguard/core/messagesmodel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/librssguard/core/messagesmodel.cpp b/src/librssguard/core/messagesmodel.cpp index eb3850dee..f1a329737 100644 --- a/src/librssguard/core/messagesmodel.cpp +++ b/src/librssguard/core/messagesmodel.cpp @@ -343,15 +343,15 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const { if (!qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::EnableTooltipsFeedsMessages)).toBool()) { return QVariant(); } - else if (idx.column() == MSG_DB_SCORE_INDEX) { + else { QVariant dta = m_cache->containsData(idx.row()) ? m_cache->data(idx) : QSqlQueryModel::data(idx); + QString txt = dta.toString().size() > 300 + ? (dta.toString().left(300) + QSL("...")) + : dta.toString().left(300); - return dta.toString(); - } - else { - return QVariant(); + return txt; } }