summaryrefslogtreecommitdiff
path: root/examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-09-04 19:35:21 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-09-20 13:14:43 +0000
commitdba42c925db368aa958c38c6a3481f18a57bd71f (patch)
tree12c3adc08ae21931fadeccf21a393c1a612c5045 /examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp
parenta0499c7c3ed5d93d219199184da16e508dd84a36 (diff)
downloadqtxmlpatterns-dba42c925db368aa958c38c6a3481f18a57bd71f.tar.gz
Eradicate Q_FOREACH loops and mark the module as Q_FOREACH-free
In network-settings.h, replaced a few QList of static size with C arrays. Change-Id: Iac32e68f76e3c53fa03b6a2943e1dfb5adbe6fad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp')
-rw-r--r--examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp b/examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp
index 85c8020..385fd11 100644
--- a/examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp
+++ b/examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp
@@ -73,7 +73,7 @@ XmlSyntaxHighlighter::XmlSyntaxHighlighter(QTextDocument *parent)
void XmlSyntaxHighlighter::highlightBlock(const QString &text)
{
- foreach (const HighlightingRule &rule, highlightingRules) {
+ for (const HighlightingRule &rule : qAsConst(highlightingRules)) {
QRegExp expression(rule.pattern);
int index = text.indexOf(expression);
while (index >= 0) {