From b57a7e6994abdab2b7ff7c7fc19549d66dbf598f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 6 May 2011 13:13:42 +0200 Subject: QT_USE_QSTRINGBUILDER to fix source compatibility In 4.8 we added support for using StringBuilder with QByteArray. But this is breaking source compatibility for people that used QT_USE_FAST_OPERATOR_PLUS in Qt 4.7. So we introduce a new macro Notice that QT_USE_FAST_CONCATENATION was not working without QT_USE_FAST_OPERATOR_PLUS, so we remove the checking of that macro. Reviewed-by: joao (cherry picked from commit 8447f5616be731d78081f326bb9cb3f5aa9087a4) --- tests/auto/qstringbuilder1/tst_qstringbuilder1.cpp | 3 +-- tests/auto/qstringbuilder2/tst_qstringbuilder2.cpp | 3 +-- tests/auto/qstringbuilder3/tst_qstringbuilder3.cpp | 3 +-- tests/auto/qstringbuilder4/tst_qstringbuilder4.cpp | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/auto/qstringbuilder1/tst_qstringbuilder1.cpp b/tests/auto/qstringbuilder1/tst_qstringbuilder1.cpp index 36b6b80e51..463f200043 100644 --- a/tests/auto/qstringbuilder1/tst_qstringbuilder1.cpp +++ b/tests/auto/qstringbuilder1/tst_qstringbuilder1.cpp @@ -44,8 +44,7 @@ // this is the "no harm done" version. Only operator% is active, // with NO_CAST * defined #define P % -#undef QT_USE_FAST_OPERATOR_PLUS -#undef QT_USE_FAST_CONCATENATION +#undef QT_USE_QSTRINGBUILDER #define QT_NO_CAST_FROM_ASCII #define QT_NO_CAST_TO_ASCII diff --git a/tests/auto/qstringbuilder2/tst_qstringbuilder2.cpp b/tests/auto/qstringbuilder2/tst_qstringbuilder2.cpp index 88b1f737e4..bcf88cbd69 100644 --- a/tests/auto/qstringbuilder2/tst_qstringbuilder2.cpp +++ b/tests/auto/qstringbuilder2/tst_qstringbuilder2.cpp @@ -45,8 +45,7 @@ // based version // with NO_CAST * defined #define P + -#define QT_USE_FAST_OPERATOR_PLUS -#define QT_USE_FAST_CONCATENATION +#define QT_USE_QSTRINGBUILDER #define QT_NO_CAST_FROM_ASCII #define QT_NO_CAST_TO_ASCII diff --git a/tests/auto/qstringbuilder3/tst_qstringbuilder3.cpp b/tests/auto/qstringbuilder3/tst_qstringbuilder3.cpp index afc33339f2..338fbf400f 100644 --- a/tests/auto/qstringbuilder3/tst_qstringbuilder3.cpp +++ b/tests/auto/qstringbuilder3/tst_qstringbuilder3.cpp @@ -44,8 +44,7 @@ // this is the "no harm done" version. Only operator% is active, // with NO_CAST * _not_ defined #define P % -#undef QT_USE_FAST_OPERATOR_PLUS -#undef QT_USE_FAST_CONCATENATION +#undef QT_USE_QSTRINGBUILDER #undef QT_NO_CAST_FROM_ASCII #undef QT_NO_CAST_TO_ASCII diff --git a/tests/auto/qstringbuilder4/tst_qstringbuilder4.cpp b/tests/auto/qstringbuilder4/tst_qstringbuilder4.cpp index ae4100a078..d046e59484 100644 --- a/tests/auto/qstringbuilder4/tst_qstringbuilder4.cpp +++ b/tests/auto/qstringbuilder4/tst_qstringbuilder4.cpp @@ -45,8 +45,7 @@ // based version // with NO_CAST * _not_ defined #define P + -#define QT_USE_FAST_OPERATOR_PLUS -#define QT_USE_FAST_CONCATENATION +#define QT_USE_QSTRINGBUILDER #undef QT_NO_CAST_FROM_ASCII #undef QT_NO_CAST_TO_ASCII -- cgit v1.2.3