Fix compiler warnings in qabstractxmlnodemodel test
authorJason McDonald <jason.mcdonald@nokia.com>
Thu, 5 May 2011 08:42:32 +0000 (18:42 +1000)
committerRohan McGovern <rohan.mcgovern@nokia.com>
Wed, 18 May 2011 01:04:38 +0000 (11:04 +1000)
The first parameter to qWarning() should be a format string to avoid
problems caused by the data string containing format specifiers.

Change-Id: Ib40c0dcd766203fc41182a50680733fff9035045
Reviewed-by: Rohan McGovern
(cherry picked from commit 4e7194ba2fd29dc38adc5580cb85b6eed238ff64)

tests/auto/qabstractxmlnodemodel/LoadingModel.cpp

index fbc28d6..054fd69 100644 (file)
@@ -39,7 +39,6 @@
 **
 ****************************************************************************/
 
-
 #include <QFile>
 #include <QStack>
 
@@ -337,7 +336,7 @@ void Loader::load()
             /* Fallthrough. */
             case QXmlStreamReader::Invalid:
             {
-                qWarning(qPrintable(reader.errorString()));
+                qWarning("%s", qPrintable(reader.errorString()));
                 m_result.clear();
                 return;
             }
@@ -346,7 +345,7 @@ void Loader::load()
 
     if(reader.hasError())
     {
-        qWarning(qPrintable(reader.errorString()));
+        qWarning("%s", qPrintable(reader.errorString()));
         m_result.clear();
     }
 }