Compile fix.
authorSamuel Rødal <samuel.rodal@digia.com>
Wed, 13 Mar 2013 15:10:06 +0000 (16:10 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 13 Mar 2013 19:01:57 +0000 (20:01 +0100)
Some compilers don't allow the first argument to printf and similar
functions to be a non-literal string.

Change-Id: Idd11ae6679d5c0585b5d10b76c991dcfdb4f65da
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
src/qml/qml/qqmlimport.cpp

index 5374f2d..d3ec9e6 100644 (file)
@@ -150,7 +150,7 @@ QQmlType *getTypeForUrl(const QString &urlString, const QHashedStringRef& typeNa
     if (!ret) {//Usually when a type name is "found" but invalid
         //qDebug() << ret << urlString << QQmlMetaType::qmlType(url);
         if (!errors) // Cannot list errors properly, just quit
-            qFatal(QQmlMetaType::typeRegistrationFailures().join('\n').toLatin1().constData());
+            qFatal("%s", QQmlMetaType::typeRegistrationFailures().join('\n').toLatin1().constData());
         QQmlError error;
         error.setDescription(QQmlMetaType::typeRegistrationFailures().join('\n'));
         errors->prepend(error);