[fondue-commits] [SCM] Fondue Font Editor branch, master, updated. bfebb8bd678db80c937a21dd2aaa09d9b8a44a17

Eugeniy Meshcheryakov eugen at debian.org
Sun Nov 9 21:03:30 UTC 2008


The following commit has been merged in the master branch:
commit bfebb8bd678db80c937a21dd2aaa09d9b8a44a17
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date:   Sun Nov 9 22:02:51 2008 +0100

    fix usage of indexOf
    
    (see http://labs.trolltech.com/blogs/2008/11/04/910/)

diff --git a/gui/ttihighlighter.cxx b/gui/ttihighlighter.cxx
index 3b78c91..0d1389f 100644
--- a/gui/ttihighlighter.cxx
+++ b/gui/ttihighlighter.cxx
@@ -56,11 +56,11 @@ void TTIHighlighter::highlightBlock(const QString &text)
 {
 	foreach (const HighlightingRule &rule, highlightingRules) {
 		QRegExp rexp = rule.pattern;
-		int index = text.indexOf(rexp);
+		int index = rexp.indexIn(text);
 		while (index >= 0) {
 			int length = rexp.matchedLength();
 			setFormat(index, length, rule.format);
-			index = text.indexOf(rexp, index + length);
+			index = rexp.indexIn(text, index + length);
 		}
 	}
 }

-- 
Fondue Font Editor



More information about the fondue-commits mailing list