mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-14 17:47:21 +01:00
trim start/end whitespace off feed title in lists
This commit is contained in:
parent
03823ff2e3
commit
208ff870e9
@ -307,9 +307,13 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const {
|
|||||||
return dt.toString(m_customDateFormat);
|
return dt.toString(m_customDateFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (index_column == MSG_DB_FEED_TITLE_INDEX) {
|
||||||
|
// Trim feed title.
|
||||||
|
return data(idx, Qt::ItemDataRole::EditRole).toString().trimmed();
|
||||||
|
}
|
||||||
else if (index_column == MSG_DB_CONTENTS_INDEX) {
|
else if (index_column == MSG_DB_CONTENTS_INDEX) {
|
||||||
// Do not display full contents here.
|
// Do not display full contents here.
|
||||||
QString contents = data(idx, Qt::EditRole).toString().mid(0, 64).simplified() + QL1S("...");
|
QString contents = data(idx, Qt::ItemDataRole::EditRole).toString().mid(0, 64).simplified() + QL1S("...");
|
||||||
|
|
||||||
return contents;
|
return contents;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ QVariant RootItem::data(int column, int role) const {
|
|||||||
|
|
||||||
case Qt::ItemDataRole::DisplayRole:
|
case Qt::ItemDataRole::DisplayRole:
|
||||||
if (column == FDS_MODEL_TITLE_INDEX) {
|
if (column == FDS_MODEL_TITLE_INDEX) {
|
||||||
return m_title;
|
return m_title.trimmed();
|
||||||
}
|
}
|
||||||
else if (column == FDS_MODEL_COUNTS_INDEX) {
|
else if (column == FDS_MODEL_COUNTS_INDEX) {
|
||||||
int count_unread = countOfUnreadMessages();
|
int count_unread = countOfUnreadMessages();
|
||||||
|
Loading…
Reference in New Issue
Block a user