From: Marcus Eggenberger Date: Sun, 12 Oct 2008 15:09:27 +0000 (+0200) Subject: Mór X-Git-Tag: 0.3.1~188 X-Git-Url: https://git.quassel-irc.org/?a=commitdiff_plain;h=3258b69cab16d7a5cf80a27d166c0a3628fe60d2;p=quassel.git Mór --- diff --git a/src/client/messagemodel.cpp b/src/client/messagemodel.cpp index 2678dd8f..02fc8740 100644 --- a/src/client/messagemodel.cpp +++ b/src/client/messagemodel.cpp @@ -103,7 +103,7 @@ void MessageModel::insertMessageGroup(const QList &msglist) { int start = indexForId(msglist.first().msgId()); int end = start + msglist.count() - 1; MessageModelItem *dayChangeItem = 0; - + bool relocatedMsg = false; if(start > 0) { // check if the preceeding msg is a daychange message and if so if // we have to drop or relocate it at the end of this chunk @@ -122,6 +122,7 @@ void MessageModel::insertMessageGroup(const QList &msglist) { endRemoveRows(); start--; end--; + relocatedMsg = true; } } @@ -151,8 +152,9 @@ void MessageModel::insertMessageGroup(const QList &msglist) { Q_ASSERT(start == 0 || _messageList[start - 1]->msgId() < msglist.first().msgId()); - if(start < _messageList.count() && _messageList[start]->msgId() <= msglist.last().msgId()) { - qDebug() << _messageList[start] << ">" << msglist.last(); + if(start < _messageList.count()) { // && _messageList[start]->msgId() <= msglist.last().msgId()) { + qDebug() << *(_messageList[start]) << "<=" << msglist.last(); + qDebug() << start << end << msglist.count() << dayChangeItem << relocatedMsg; } Q_ASSERT(start == _messageList.count() || _messageList[start]->msgId() > msglist.last().msgId());