From: Marcus Eggenberger Date: Mon, 13 Oct 2008 12:41:23 +0000 (+0200) Subject: postcondition checks for insertions into the chatscene X-Git-Tag: 0.3.1~170 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=e5ff452e4192950db3fe0770190fb17c4919e358 postcondition checks for insertions into the chatscene --- diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 89d4422a..49bb89f4 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -270,6 +270,8 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e } } + Q_ASSERT(start == 0 || _lines.at(start - 1)->pos().y() + _lines.at(start - 1)->height() == _lines.at(start)->pos().y()); + Q_ASSERT(end + 1 == _lines.count() || _lines.at(end)->pos().y() + _lines.at(end)->height() == _lines.at(end + 1)->pos().y()); // update sceneRect // when searching for the first non-date-line we have to take into account that our