X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmessage.cpp;h=c867a7cbc2a9283178393723e766679035a970c2;hp=124a291aa8564c85d599204942c19451776a7b26;hb=946e79e0243dda74433016060f12abc65883f243;hpb=dfbd0465f2a58eee4771472afd261869e5e5c400 diff --git a/src/common/message.cpp b/src/common/message.cpp index 124a291a..c867a7cb 100644 --- a/src/common/message.cpp +++ b/src/common/message.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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(); @@ -70,3 +66,11 @@ QDataStream &operator>>(QDataStream &in, Message &msg) { return in; } +QDebug operator<<(QDebug dbg, const Message &msg) { + dbg.nospace() << qPrintable(QString("Message(MsgId:")) << msg.msgId() + << qPrintable(QString(",")) << msg.timestamp() + << qPrintable(QString(", Type:")) << msg.type() + << qPrintable(QString(", Flags:")) << msg.flags() << qPrintable(QString(")")) + << msg.sender() << ":" << msg.contents(); + return dbg; +}