summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-02-16 07:40:20 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-17 05:27:25 +0100
commitd94ab97b7741de7c73d4d203b9cca7bd150d581f (patch)
tree6cdba53d70124cf7a7d965763672b7841c15a2ae
parent03cbcab18471c02878b0207e2a59976ffa76caa5 (diff)
[QTBUG-22847] Compile with C++11 compiler
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>
-rw-r--r--src/corelib/plugin/qplugin.h6
-rw-r--r--src/testlib/qxmltestlogger.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h
index 90ab8369c9..93be7248c3 100644
--- a/src/corelib/plugin/qplugin.h
+++ b/src/corelib/plugin/qplugin.h
@@ -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) \
diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp
index 28ae6ff095..7e5da20680 100644
--- a/src/testlib/qxmltestlogger.cpp
+++ b/src/testlib/qxmltestlogger.cpp
@@ -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());
}