Replaced deprecated QDateTime::toString by QLocale::toString

This commit is contained in:
thunder2 2025-07-20 23:43:49 +02:00
parent 291b2f7cad
commit f0286740f4
4 changed files with 8 additions and 5 deletions

View file

@ -227,7 +227,7 @@ void ChannelPostDelegate::paint(QPainter * painter, const QStyleOptionViewItem &
y += font_height;
y += font_height/2.0;
QString info_text = QDateTime::fromMSecsSinceEpoch(qint64(1000)*post.mMeta.mPublishTs).toString(Qt::DefaultLocaleShortDate);
QString info_text = QLocale::system().toString(DateTime::DateTimeFromTime_t(post.mMeta.mPublishTs), QLocale::ShortFormat);
if(post.mAttachmentCount > 0)
info_text += ", " + QString::number(post.mAttachmentCount)+ " " +((post.mAttachmentCount>1)?tr("files"):tr("file")) + " (" + misc::friendlyUnit(qulonglong(post.mSize)) + ")" ;