mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-15 00:28:58 -05:00
fix error: 'fromTime_t' is not a member of 'QDateTime' when build with Qt6
QDateTime::fromTime_t QDateTime::fromSecsSinceEpoch
This commit is contained in:
parent
3baf444452
commit
a1a0d067df
1 changed files with 5 additions and 0 deletions
|
|
@ -242,8 +242,13 @@ void FriendsDialog::chatMessageReceived(const ChatMessage &msg)
|
|||
if(!msg.chat_id.isBroadcast())
|
||||
return;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
QDateTime sendTime = QDateTime::fromSecsSinceEpoch(msg.sendTime);
|
||||
QDateTime recvTime = QDateTime::fromSecsSinceEpoch(msg.recvTime);
|
||||
#else
|
||||
QDateTime sendTime = QDateTime::fromTime_t(msg.sendTime);
|
||||
QDateTime recvTime = QDateTime::fromTime_t(msg.recvTime);
|
||||
#endif
|
||||
QString message = QString::fromUtf8(msg.msg.c_str());
|
||||
QString name = QString::fromUtf8(rsPeers->getPeerName(msg.broadcast_peer_id).c_str());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue