summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstringbuilder1
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-03-01 14:10:08 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2011-03-01 14:15:11 +0100
commit124cc3c0dfe18c2e5027a0eee430ac03b48807c0 (patch)
tree20c289a0785786c124eef5908ed5a7cd276c2a45 /tests/auto/qstringbuilder1
parent17a4f332f0d416af842145f0ebc7f2ebe7f33527 (diff)
Wrap qPrintable inside QString
QString() is a no-op if string is already a QString And it fixes the compilation if other types are use that do not have toLocal8Bit such as QStringBuilder. WebKit trunk has an instance of such usage. Reviewed-by: Joao
Diffstat (limited to 'tests/auto/qstringbuilder1')
-rw-r--r--tests/auto/qstringbuilder1/stringbuilder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qstringbuilder1/stringbuilder.cpp b/tests/auto/qstringbuilder1/stringbuilder.cpp
index b4f633436e..1ea734702d 100644
--- a/tests/auto/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/qstringbuilder1/stringbuilder.cpp
@@ -110,4 +110,6 @@ void runScenario()
r = string P ba;
QCOMPARE(r, r2);
#endif
+
+ QCOMPARE(QByteArray(qPrintable(string P string)), QByteArray(string.toLatin1() + string.toLatin1()));
}