projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lots of additions again. Working on implementing commands and prettifying the output.
[quassel.git]
/
main
/
message.cpp
diff --git
a/main/message.cpp
b/main/message.cpp
index
3739822
..
e89d1a1
100644
(file)
--- a/
main/message.cpp
+++ b/
main/message.cpp
@@
-22,14
+22,16
@@
#include <QDataStream>
QDataStream &operator<<(QDataStream &out, const Message &msg) {
#include <QDataStream>
QDataStream &operator<<(QDataStream &out, const Message &msg) {
- out << (quint8)msg.type << (quint8)msg.flags << msg.sender << msg.msg;
+ out << (quint8)msg.type << (quint8)msg.flags << msg.sender << msg.msg
<< (quint32)msg.timeStamp.toTime_t()
;
return out;
}
QDataStream &operator>>(QDataStream &in, Message &msg) {
quint8 t, f;
return out;
}
QDataStream &operator>>(QDataStream &in, Message &msg) {
quint8 t, f;
- in >> t >> f >> msg.sender >> msg.msg;
+ quint32 ts;
+ in >> t >> f >> msg.sender >> msg.msg >> ts;
msg.type = (Message::Type)t;
msg.flags = (Message::Flags)f;
msg.type = (Message::Type)t;
msg.flags = (Message::Flags)f;
+ msg.timeStamp = QDateTime::fromTime_t(ts);
return in;
}
return in;
}