From 3258b69cab16d7a5cf80a27d166c0a3628fe60d2 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Sun, 12 Oct 2008 17:09:27 +0200 Subject: [PATCH] =?utf8?q?M=C3=B3r?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/client/messagemodel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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()); -- 2.20.1