Merge pull request #3245 from jolavillette/fix/qt6-qdatetime-settime_t

Qt6: replace removed QDateTime::setTime_t() with setSecsSinceEpoch()
This commit is contained in:
csoler 2026-06-25 13:40:22 +02:00 committed by GitHub
commit d20c783769
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@ void GxsCommentDialog::setCommentHeader(QWidget *header)
ui->postFrame->setVisible(true);
QDateTime qtime;
qtime.setTime_t(mCurrentPost.mMeta.mPublishTs);
qtime.setSecsSinceEpoch(mCurrentPost.mMeta.mPublishTs);
QString timestamp = DateTime::formatDateTime(qtime);
ui->dateLabel->setText(timestamp);
ui->fromLabel->setText(QString::fromUtf8(mCurrentPost.mMeta.mAuthorId.c_str()));

View File

@ -994,7 +994,7 @@ static void recursPrintModel(const std::vector<ForumModelPostEntry>& entries,For
const ForumModelPostEntry& e(entries[index]);
QDateTime qtime;
qtime.setTime_t(e.mPublishTs);
qtime.setSecsSinceEpoch(e.mPublishTs);
std::cerr << std::string(depth*2,' ') << index << " : " << e.mAuthorId.toStdString() << " "
<< QString("%1").arg((uint32_t)e.mPostFlags,8,16,QChar('0')).toStdString() << " "
@ -1024,7 +1024,7 @@ void RsGxsForumModel::debug_dump()
std::cerr << " " << e.mChildren[j] ;
QDateTime qtime;
qtime.setTime_t(e.mPublishTs);
qtime.setSecsSinceEpoch(e.mPublishTs);
std::cerr << " (" << e.mParent << ")";
std::cerr << " " << qtime.toString().toStdString() << " \"" << e.mTitle << "\"" << std::endl;