Use QDateTime::fromSecsSinceEpoch in Qt 6 instead of QDateTime::fromTime_t

This commit is contained in:
thunder2 2025-07-18 18:58:45 +02:00 committed by Thunder
parent a00c1375e5
commit 42b3b95fd8
19 changed files with 62 additions and 41 deletions

View file

@ -29,6 +29,7 @@
#include <math.h>
#include "DLListDelegate.h"
#include "util/DateTime.h"
Q_DECLARE_METATYPE(FileProgressInfo)
@ -261,7 +262,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
break;
qi64Value = index.data().value<qint64>();
if (qi64Value < std::numeric_limits<qint64>::max()){
QDateTime qdtLastDL = QDateTime::fromTime_t(qi64Value);
QDateTime qdtLastDL = DateTime::DateTimeFromTime_t(qi64Value);
painter->drawText(option.rect, Qt::AlignCenter, qdtLastDL.toString("yyyy-MM-dd_hh:mm:ss"));
} else {
painter->drawText(option.rect, Qt::AlignCenter, tr("File Never Seen"));