From 946e79e0243dda74433016060f12abc65883f243 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Tue, 13 Jan 2009 13:57:44 +0100 Subject: [PATCH] Message object cleanup --- src/common/message.cpp | 4 ---- src/common/message.h | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/common/message.cpp b/src/common/message.cpp index f1f7c48a..c867a7cb 100644 --- a/src/common/message.cpp +++ b/src/common/message.cpp @@ -44,10 +44,6 @@ Message::Message(const QDateTime &ts, const BufferInfo &bufferInfo, Type type, c { } -void Message::setFlags(Flags flags) { - _flags = flags; -} - QDataStream &operator<<(QDataStream &out, const Message &msg) { out << msg.msgId() << (quint32)msg.timestamp().toTime_t() << (quint32)msg.type() << (quint8)msg.flags() << msg.bufferInfo() << msg.sender().toUtf8() << msg.contents().toUtf8(); diff --git a/src/common/message.h b/src/common/message.h index d042c7b0..c1b8e625 100644 --- a/src/common/message.h +++ b/src/common/message.h @@ -74,9 +74,10 @@ public: inline QString sender() const { return _sender; } inline Type type() const { return _type; } inline Flags flags() const { return _flags; } + inline void setFlags(Flags flags) { _flags = flags; } inline QDateTime timestamp() const { return _timestamp; } - void setFlags(Flags flags); + inline bool isValid() const { return _msgId.isValid(); } inline bool operator<(const Message &other) const { return _msgId < other._msgId; } @@ -89,8 +90,6 @@ private: Type _type; Flags _flags; - QString _formattedTimestamp, _formattedSender, _formattedText; // cache - friend QDataStream &operator>>(QDataStream &in, Message &msg); }; -- 2.20.1