From: Marcus Eggenberger Date: Sun, 12 Oct 2008 12:00:32 +0000 (+0200) Subject: Disabling indexing in the ChatScene as a workaround to keep quassel from crashing... X-Git-Tag: 0.3.1~191 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=8c785cc905a648fd48838c99387da21a97ff6819 Disabling indexing in the ChatScene as a workaround to keep quassel from crashing (ie. webpreviews) --- diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 40a0c8b0..89d4422a 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -96,7 +96,7 @@ ChatScene::ChatScene(QAbstractItemModel *model, const QString &idString, qreal w connect(&webPreview.delayTimer, SIGNAL(timeout()), this, SLOT(showWebPreview())); // installEventFilter(this); - // setItemIndexMethod(QGraphicsScene::NoIndex); + setItemIndexMethod(QGraphicsScene::NoIndex); } ChatScene::~ChatScene() { @@ -192,6 +192,10 @@ void ChatScene::rowsInserted(const QModelIndex &index, int start, int end) { } } + // check if all went right + 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()); + if(!atBottom) { if(start < _firstLineRow) { int prevFirstLineRow = _firstLineRow + (end - start + 1);