projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3ec6f31
)
Set current time on creation of MessageEvents if no other time is given
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 13 Oct 2010 19:41:13 +0000
(21:41 +0200)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Wed, 13 Oct 2010 23:06:33 +0000
(
01:06
+0200)
While we can probable leave the timestamp uninitialized for other event types, we certainly
always need a valid time for messages.
src/common/messageevent.cpp
patch
|
blob
|
history
diff --git
a/src/common/messageevent.cpp
b/src/common/messageevent.cpp
index
70857d8
..
d872da7
100644
(file)
--- a/
src/common/messageevent.cpp
+++ b/
src/common/messageevent.cpp
@@
-41,7
+41,10
@@
MessageEvent::MessageEvent(Message::Type msgType, Network *net, const QString &m
_bufferType = bufferTypeByTarget(_target);
- setTimestamp(timestamp);
+ if(timestamp.isValid())
+ setTimestamp(timestamp);
+ else
+ setTimestamp(QDateTime::currentDateTime());
}
BufferInfo::Type MessageEvent::bufferTypeByTarget(const QString &target) const {