summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstringbuilder1/stringbuilder.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-02-25 23:35:43 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-02-25 23:35:43 (GMT)
commit31c8459d65aaca9131a8aa32e29e0591ed7892cb (patch)
tree5339f4b4291c17a9a765a70990ec3c12f4055de7 /tests/auto/qstringbuilder1/stringbuilder.cpp
parent5c82031a7357f4f3d100be30c0bfe4e878712829 (diff)
parent61811d9b43828c1cc53c773fd66b78313f4fb942 (diff)
downloadQt-31c8459d65aaca9131a8aa32e29e0591ed7892cb.zip
Qt-31c8459d65aaca9131a8aa32e29e0591ed7892cb.tar.gz
Qt-31c8459d65aaca9131a8aa32e29e0591ed7892cb.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Conflicts: src/declarative/qml/qdeclarativeproperty.cpp
Diffstat (limited to 'tests/auto/qstringbuilder1/stringbuilder.cpp')
-rw-r--r--tests/auto/qstringbuilder1/stringbuilder.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/auto/qstringbuilder1/stringbuilder.cpp b/tests/auto/qstringbuilder1/stringbuilder.cpp
index 8e95818..e9ae7a6 100644
--- a/tests/auto/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/qstringbuilder1/stringbuilder.cpp
@@ -44,6 +44,14 @@
// "some literal", but replacing all vocals by their umlauted UTF-8 string :)
#define UTF8_LITERAL "s\xc3\xb6m\xc3\xab l\xc3\xaft\xc3\xabr\xc3\xa4l"
+
+//fix for gcc4.0: if the operator+ does not exist without QT_USE_FAST_OPERATOR_PLUS
+#ifndef QT_USE_FAST_CONCATENATION
+#define Q %
+#else
+#define Q P
+#endif
+
void runScenario()
{
// set codec for C strings to 0, enforcing Latin1
@@ -59,13 +67,13 @@ void runScenario()
QString r;
QByteArray ba(LITERAL);
- r = l1literal P l1literal;
+ r = l1literal Q l1literal;
QCOMPARE(r, r2);
r = string P string;
QCOMPARE(r, r2);
- r = stringref P stringref;
+ r = stringref Q stringref;
QCOMPARE(r, QString(stringref.toString() + stringref.toString()));
- r = string P l1literal;
+ r = string Q l1literal;
QCOMPARE(r, r2);
r = string P l1string;
QCOMPARE(r, r2);