summaryrefslogtreecommitdiff
path: root/tests/auto/xmlpatterns/tst_xmlpatterns.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 /tests/auto/xmlpatterns/tst_xmlpatterns.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 'tests/auto/xmlpatterns/tst_xmlpatterns.cpp')
-rw-r--r--tests/auto/xmlpatterns/tst_xmlpatterns.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
index 1a08a66..294e5fc 100644
--- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
+++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
@@ -1028,7 +1028,7 @@ void tst_XmlPatterns::xsltSupport_data() const
*/
QString tst_XmlPatterns::filterStderr(const QString &in)
{
- static QList<QRegExp> irrelevant = QList<QRegExp>()
+ static const QList<QRegExp> irrelevant = QList<QRegExp>()
// specific filenames
<< QRegExp(QLatin1String("file:\\/\\/.*(\\.xq|\\.gccxml|\\.xml|\\.xsl|-)(,|:)"))
@@ -1040,9 +1040,8 @@ QString tst_XmlPatterns::filterStderr(const QString &in)
;
QString out = in;
- foreach (const QRegExp& rx, irrelevant) {
+ for (const QRegExp& rx : irrelevant)
out = out.remove(rx);
- }
return out;
}