diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-19 11:14:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-19 12:38:28 +0000 |
commit | 240d768ca6ef41bf661a1fb8e1bde408e25ba553 (patch) | |
tree | 0ea2483a76b80ce25f21bc421f29513a301dceaf /tests/auto/network/access/qnetworkcookiejar | |
parent | 733ac31cccc6ef9e0f1180f3aa4aa4f7db3fe65d (diff) |
tests/auto/network: Remove some placeholder formatting.
Use QByteArray/QString addition instead in loops and for
test row names.
Change-Id: I7974ace5b34f2da43e7511044e80de1e733245ac
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/network/access/qnetworkcookiejar')
-rw-r--r-- | tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index 12ac1e519d..f1ac7bc386 100644 --- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -72,16 +72,17 @@ namespace QTest { template<> char *toString(const QList<QNetworkCookie> &list) { - QString result = "QList("; + QByteArray result = "QList("; bool first = true; foreach (QNetworkCookie cookie, list) { if (!first) result += ", "; first = false; - result += QString::fromLatin1("QNetworkCookie(%1)").arg(QLatin1String(cookie.toRawForm())); + result += "QNetworkCookie(" + cookie.toRawForm() + ')'; } - return qstrdup(result.append(')').toLocal8Bit()); + result.append(')'); + return qstrdup(result.constData()); } } |