Change str.indexOf(rx) to rx.indexIn(str)
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 12 Feb 2009 00:59:49 +0000 (01:59 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 12 Feb 2009 01:01:07 +0000 (02:01 +0100)
This might (!) fix the freezes encountered when running a binary compiled against Qt 4.4
with Qt 4.5. Not tested though.

cf. http://labs.trolltech.com/blogs/2008/11/04/910/

src/qtui/chatitem.cpp

index de96b2d..934fadf 100644 (file)
@@ -445,7 +445,7 @@ QList<ContentsChatItem::Clickable> ContentsChatItem::findClickables() const {
     for(int i = 0; i < regExpCount; i++) {
       if(matches[i] < 0 || matchEnd[i] > str.length()) continue;
       if(idx >= matchEnd[i]) {
-        matches[i] = str.indexOf(regExp[i], qMax(matchEnd[i], idx));
+        matches[i] = regExp[i].indexIn(str, qMax(matchEnd[i], idx));
         if(matches[i] >= 0) matchEnd[i] = matches[i] + regExp[i].cap(1).length();
       }
       if(matches[i] >= 0 && matches[i] < minidx) {