From 7a1eca89ead6eb300c593ace9f14c0eb2f9836b8 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Sat, 9 Aug 2008 18:47:53 +0200 Subject: [PATCH] fixing empty chatlines on mac os (hopefully on windows too). This looks very much like a Qt Bug --- src/qtui/chatlinemodelitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qtui/chatlinemodelitem.cpp b/src/qtui/chatlinemodelitem.cpp index 73b15330..84832cdf 100644 --- a/src/qtui/chatlinemodelitem.cpp +++ b/src/qtui/chatlinemodelitem.cpp @@ -123,7 +123,9 @@ void ChatLineModelItem::computeWrapList() { word.start = idx; mode = SearchEnd; } - } while(finder.isAtBoundary()); + // the part " || (finder.position() == _contents.plainText.length())" shouldn't be necessary + // but in rare and indeterministic cases Qt states that the end of the text is not a boundary o_O + } while(finder.isAtBoundary() || (finder.position() == _contents.plainText.length())); // A QVector needs less space than a QList _wrapList.resize(wplist.count()); -- 2.20.1