Fixed compile of qtxmlpatterns against latest qtbase (`qs' macro)
authorRohan McGovern <rohan.mcgovern@nokia.com>
Thu, 7 Jul 2011 23:16:39 +0000 (09:16 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 7 Jul 2011 23:25:33 +0000 (01:25 +0200)
ee85e9cc10bc6874c892b09fa54b5dbd79854069 adds a macro qs(str), which
breaks some code already using `qs' as a variable name.

Change-Id: I92ee0f77499a5c815a940f719febee9d01b843cb
Reviewed-on: http://codereview.qt.nokia.com/1331
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
tests/auto/qxmlquery/tst_qxmlquery.cpp

index eb372f7..024301e 100644 (file)
@@ -994,14 +994,12 @@ void tst_QXmlQuery::evaluateToReceiver_data() const
 {
     QTest::addColumn<QString>("inputQuery");
 
-    const QStringList qs(queries());
-
-    for(int i = 0; i < qs.size(); ++i)
+    foreach (QString const& query, queries())
     {
         /* This outputs a URI specific to the environment, so we can't use it for this
          * particular test. */
-        if(qs.at(i) != QLatin1String("staticBaseURI.xq"))
-            QTest::newRow(qs.at(i).toUtf8().constData()) << qs.at(i);
+        if (query != QLatin1String("staticBaseURI.xq"))
+            QTest::newRow(query.toUtf8().constData()) << query;
     }
 }