mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-27 08:33:27 +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);
|
||||
}
|
||||
}
|
||||
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) {
|
||||
// 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;
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ QVariant RootItem::data(int column, int role) const {
|
||||
|
||||
case Qt::ItemDataRole::DisplayRole:
|
||||
if (column == FDS_MODEL_TITLE_INDEX) {
|
||||
return m_title;
|
||||
return m_title.trimmed();
|
||||
}
|
||||
else if (column == FDS_MODEL_COUNTS_INDEX) {
|
||||
int count_unread = countOfUnreadMessages();
|
||||
|
Loading…
Reference in New Issue
Block a user