From 77a8005dcb12a274193c8009df03e84ff6b51582 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 4 Jun 2020 02:24:19 +0200 Subject: QStringBuilder: code tidies in the tests Including other headers, while defining very questionable macro names, can and will result in trouble. Stop doing that. While at it, move from including to include-what-you-use, and clean up the code a bit. Change-Id: Idb02ef2b612c0805baecac3ce6edd435609aca4c Reviewed-by: Lars Knoll --- .../qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/auto/corelib/text/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp') diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp index 05ce334c82..4efc69908e 100644 --- a/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp +++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder4/tst_qstringbuilder4.cpp @@ -31,13 +31,14 @@ // this is the "full" version. Operator+ is replaced by a QStringBuilder // based version // with NO_CAST * _not_ defined -#define P + #define QT_USE_QSTRINGBUILDER #undef QT_NO_CAST_FROM_ASCII #undef QT_NO_CAST_TO_ASCII - -#include +#include +#include +#include +#include #define LITERAL "some literal" @@ -51,7 +52,10 @@ private slots: void scenario() { runScenario(); } }; +#define P + #include "../qstringbuilder1/stringbuilder.cpp" +#undef P + #include "tst_qstringbuilder4.moc" QTEST_APPLESS_MAIN(tst_QStringBuilder4) -- cgit v1.2.3