From 02279f898877bdc43dff42efda1add060983426a Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Wed, 10 Oct 2007 15:26:25 +0000 Subject: [PATCH] Avoid a strange (maybe gcc-related?) bug where Quassel would crash in ChatLine::layout(), if it is built with qmake in release mode. Changing the type of i from int to uint fixes this. Nope, I don't see a rational explanation for that. --- src/qtgui/chatline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtgui/chatline.cpp b/src/qtgui/chatline.cpp index 7c6ffaa5..4c031529 100644 --- a/src/qtgui/chatline.cpp +++ b/src/qtgui/chatline.cpp @@ -235,7 +235,7 @@ qreal ChatLine::layout(qreal tsw, qreal senderw, qreal textw) { line.y = 0; line.start = 0; line.height = minHeight; // first line needs room for ts and sender - for(int i = 0; i < words.count(); i++) { + for(uint i = 0; i < (uint)words.count(); i++) { int lastpos = charPos[words[i].start + words[i].length]; // We use charPos[lastchar + 1], 'coz last char needs to fit if(lastpos - offset <= textw) { line.height = qMax(line.height, words[i].height); -- 2.20.1