X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fmessageevent.cpp;h=6c36715eb5e4e7fbe0f49c403a4952c5fa3fadbb;hb=79a8a98f5a499c2da6c1e57855e9c7b2815ec6d4;hp=70857d82a717f1c1196f4714c889b3892e4d0dad;hpb=e49f87a6227dc6f82c17126a886cfc83ccf5e3ed;p=quassel.git diff --git a/src/common/messageevent.cpp b/src/common/messageevent.cpp index 70857d82..6c36715e 100644 --- a/src/common/messageevent.cpp +++ b/src/common/messageevent.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2010 by the Quassel Project * + * Copyright (C) 2005-2012 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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 {