From 91bf025444f13eb269ece6bb430a841638bb32a8 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 22 Nov 2011 14:49:57 +0100 Subject: Add spaces for string concatenation to work around C++11 source incompatibility. Reviewed-by: Oswald Buddenhagen Task-number: QTBUG-22847 --- doc/src/snippets/code/doc_src_examples_icons.cpp | 2 +- doc/src/snippets/code/doc_src_examples_imageviewer.cpp | 2 +- src/3rdparty/libpng/pngdebug.h | 6 +++--- src/corelib/plugin/qplugin.h | 8 ++++---- src/testlib/qxmltestlogger.cpp | 4 ++-- util/unicode/main.cpp | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/src/snippets/code/doc_src_examples_icons.cpp b/doc/src/snippets/code/doc_src_examples_icons.cpp index 411c49f..dfb0182 100644 --- a/doc/src/snippets/code/doc_src_examples_icons.cpp +++ b/doc/src/snippets/code/doc_src_examples_icons.cpp @@ -40,5 +40,5 @@ //! [0] if (!condition) - qFatal("ASSERT: "condition" in file ..."); + qFatal("ASSERT: " condition " in file ..."); //! [0] diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.cpp b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp index c86f8ac..07e50be 100644 --- a/doc/src/snippets/code/doc_src_examples_imageviewer.cpp +++ b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp @@ -45,7 +45,7 @@ imageLabel->resize(imageLabel->pixmap()->size()); //! [1] if (!imageLabel->pixmap()) - qFatal("ASSERT: "imageLabel->pixmap()" in file ..."); + qFatal("ASSERT: " imageLabel->pixmap() " in file ..."); //! [1] diff --git a/src/3rdparty/libpng/pngdebug.h b/src/3rdparty/libpng/pngdebug.h index 16f81fd..4547b7d 100644 --- a/src/3rdparty/libpng/pngdebug.h +++ b/src/3rdparty/libpng/pngdebug.h @@ -85,7 +85,7 @@ # define png_debug(l,m) \ do { \ int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ } while (0) # endif @@ -93,7 +93,7 @@ # define png_debug1(l,m,p1) \ do { \ int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ } while (0) # endif @@ -101,7 +101,7 @@ # define png_debug2(l,m,p1,p2) \ do { \ int num_tabs=l; \ - fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ + fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ } while (0) # endif diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h index 40e6e66..559822a 100644 --- a/src/corelib/plugin/qplugin.h +++ b/src/corelib/plugin/qplugin.h @@ -115,10 +115,10 @@ void Q_CORE_EXPORT qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunctio # 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"\n" \ - "buildkey="QT_BUILD_KEY; + "pattern=QT_PLUGIN_VERIFICATION_DATA\n" \ + "version=" QT_VERSION_STR "\n" \ + "debug=" QPLUGIN_DEBUG_STR "\n" \ + "buildkey=" QT_BUILD_KEY; # if defined (Q_OF_ELF) && defined (Q_CC_GNU) # define Q_PLUGIN_VERIFICATION_SECTION \ diff --git a/src/testlib/qxmltestlogger.cpp b/src/testlib/qxmltestlogger.cpp index 2c8ba6c..1cb221c 100644 --- a/src/testlib/qxmltestlogger.cpp +++ b/src/testlib/qxmltestlogger.cpp @@ -120,14 +120,14 @@ void QXmlTestLogger::startLogging() QTest::qt_asprintf(&buf, "\n" " %s\n" - " "QTEST_VERSION_STR"\n" + " " QTEST_VERSION_STR "\n" " %d\n" "\n", qVersion(), randomSeed); } else { QTest::qt_asprintf(&buf, "\n" " %s\n" - " "QTEST_VERSION_STR"\n" + " " QTEST_VERSION_STR "\n" "\n", qVersion()); } outputString(buf.constData()); diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 4d43464..4fa4ce0 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -2722,8 +2722,8 @@ int main(int, char **) "#define QUNICODETABLES_P_H\n\n" "#include \n\n" "QT_BEGIN_NAMESPACE\n\n"); - f.write("#define UNICODE_DATA_VERSION "DATA_VERSION_STR"\n\n"); - f.write("#define UNICODE_LAST_CODEPOINT "LAST_CODEPOINT_STR"\n\n"); + f.write("#define UNICODE_DATA_VERSION " DATA_VERSION_STR "\n\n"); + f.write("#define UNICODE_LAST_CODEPOINT " LAST_CODEPOINT_STR "\n\n"); f.write("namespace QUnicodeTables {\n\n"); f.write(property_string); f.write("\n"); -- cgit v0.12 From 81ae9027b72dcf3635d2fb9f20e63d60b35d62e8 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 22 Nov 2011 14:50:34 +0100 Subject: Webkit: Work around C++11 string literal source incompatibility. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ISO/IEC 14882 2.2 Phases of translations: "user defined string literals" are recognized as single preprocessor token in Phase 3, left unchanged by "...preprocessing executed" in Phase 4. Previously, there were no user defined liteal, and the intended concatanation was done in Phase 6 "adjacent string literal tokens are concatenated", after the macro expansion. Reviewed-by: Tor Arne Vestbø getExtensionString() : ""); default: diff --git a/src/3rdparty/webkit/Source/WebCore/platform/sql/SQLiteFileSystem.cpp b/src/3rdparty/webkit/Source/WebCore/platform/sql/SQLiteFileSystem.cpp index 362005c..c4ca6aa 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/sql/SQLiteFileSystem.cpp +++ b/src/3rdparty/webkit/Source/WebCore/platform/sql/SQLiteFileSystem.cpp @@ -77,10 +77,10 @@ String SQLiteFileSystem::getFileNameForNewDatabase(const String& dbDir, const St String fileName; do { ++seq; - fileName = pathByAppendingComponent(dbDir, String::format("%016"PRIx64".db", seq)); + fileName = pathByAppendingComponent(dbDir, String::format("%016" PRIx64 ".db", seq)); } while (fileExists(fileName)); - return String::format("%016"PRIx64".db", seq); + return String::format("%016" PRIx64 ".db", seq); } String SQLiteFileSystem::appendDatabaseFileNameToPath(const String& path, const String& fileName) -- cgit v0.12