[QTBUG-22847] Compile with C++11 compiler
authorMarc Mutz <marc.mutz@kdab.com>
Thu, 16 Feb 2012 06:40:20 +0000 (07:40 +0100)
committerQt by Nokia <qt-info@nokia.com>
Fri, 17 Feb 2012 04:27:25 +0000 (05:27 +0100)
C++11 supports user-defined string literals, which makes
the C++98-accepted literal string concatenation sequence
  "foo"MACRO
illegal under C++11.

The solution is to add whitespace between the string
literal and the macro. For symmetry, this patch adds it
on both sides.

Change-Id: Ie0c698f610986c4d1b12dc2083489043b696936d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/corelib/plugin/qplugin.h
src/testlib/qxmltestlogger.cpp

index 90ab836..93be724 100644 (file)
@@ -154,9 +154,9 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin);
 #  endif
 #  define Q_PLUGIN_VERIFICATION_DATA \
     static const char qt_plugin_verification_data[] = \
-      "pattern=""QT_PLUGIN_VERIFICATION_DATA""\n" \
-      "version="QT_VERSION_STR"\n" \
-      "debug="QPLUGIN_DEBUG_STR;
+      "pattern=" "QT_PLUGIN_VERIFICATION_DATA" "\n" \
+      "version=" QT_VERSION_STR "\n" \
+      "debug=" QPLUGIN_DEBUG_STR;
 
 
 #  define Q_EXPORT_PLUGIN2(PLUGIN, PLUGINCLASS)      \
index 28ae6ff..7e5da20 100644 (file)
@@ -118,7 +118,7 @@ void QXmlTestLogger::startLogging()
     QTest::qt_asprintf(&buf,
                 "<Environment>\n"
                 "    <QtVersion>%s</QtVersion>\n"
-                "    <QTestVersion>"QTEST_VERSION_STR"</QTestVersion>\n"
+                "    <QTestVersion>" QTEST_VERSION_STR "</QTestVersion>\n"
                 "</Environment>\n", qVersion());
     outputString(buf.constData());
 }