show expanded/long timedate format on tooltip, fix #621

This commit is contained in:
Martin Rotter 2022-02-05 19:11:49 +01:00
parent 91573ec11d
commit 158d69a569
1 changed files with 6 additions and 0 deletions

View File

@ -365,6 +365,12 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const {
return TextFactory::shorten(data(idx, Qt::ItemDataRole::DisplayRole).toString(), return TextFactory::shorten(data(idx, Qt::ItemDataRole::DisplayRole).toString(),
TEXT_TOOLTIP_LIMIT); TEXT_TOOLTIP_LIMIT);
} }
else if (idx.column() == MSG_DB_DCREATED_INDEX) {
return qApp->localization()->loadedLocale().toString(
QDateTime::fromMSecsSinceEpoch(data(idx,
Qt::ItemDataRole::EditRole).toLongLong()).toLocalTime(),
QLocale::FormatType::LongFormat);
}
else { else {
return data(idx, Qt::ItemDataRole::DisplayRole); return data(idx, Qt::ItemDataRole::DisplayRole);
} }