From 24cf3984c8c8941bb5772a1208c7f6dfc26ac4be Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 30 Oct 2024 06:44:26 +0300 Subject: [PATCH] Implemented operator<< for FullMsgId to enable qDebug output. --- Telegram/SourceFiles/data/data_msg_id.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Telegram/SourceFiles/data/data_msg_id.h b/Telegram/SourceFiles/data/data_msg_id.h index b3ecb27b0..b2faef165 100644 --- a/Telegram/SourceFiles/data/data_msg_id.h +++ b/Telegram/SourceFiles/data/data_msg_id.h @@ -156,6 +156,18 @@ struct FullMsgId { MsgId msg = 0; }; +#ifdef _DEBUG +inline QDebug operator<<(QDebug debug, const FullMsgId &fullMsgId) { + debug.nospace() + << "FullMsgId(peer: " + << fullMsgId.peer.value + << ", msg: " + << fullMsgId.msg.bare + << ")"; + return debug; +} +#endif // _DEBUG + Q_DECLARE_METATYPE(FullMsgId); struct FullReplyTo {