summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp6
-rw-r--r--tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/containers-associative/main.cpp8
-rw-r--r--tests/benchmarks/corelib/tools/containers-sequential/main.cpp16
-rw-r--r--tests/benchmarks/dbus/qdbustype/main.cpp2
-rw-r--r--tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp6
6 files changed, 21 insertions, 21 deletions
diff --git a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
index 9c1b8c32f6..7cb5dfd5cd 100644
--- a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
+++ b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp
@@ -93,7 +93,7 @@ void tst_QAuthenticator::basicAuth()
QVERIFY(priv->phase == QAuthenticatorPrivate::Start);
QList<QPair<QByteArray, QByteArray> > headers;
- headers << qMakePair(QByteArray("WWW-Authenticate"), "Basic " + data.toUtf8());
+ headers << qMakePair<QByteArray, QByteArray>(QByteArray("WWW-Authenticate"), "Basic " + data.toUtf8());
priv->parseHttpResponse(headers, /*isProxy = */ false);
QCOMPARE(auth.realm(), realm);
@@ -104,7 +104,7 @@ void tst_QAuthenticator::basicAuth()
QVERIFY(priv->phase == QAuthenticatorPrivate::Start);
- QCOMPARE(priv->calculateResponse("GET", "/").constData(), ("Basic " + expectedReply).constData());
+ QCOMPARE(priv->calculateResponse("GET", "/").constData(), QByteArray("Basic " + expectedReply).constData());
}
void tst_QAuthenticator::ntlmAuth_data()
@@ -138,7 +138,7 @@ void tst_QAuthenticator::ntlmAuth()
// NTLM phase 2: challenge
headers.clear();
- headers << qMakePair(QByteArray("WWW-Authenticate"), "NTLM " + data.toUtf8());
+ headers << qMakePair<QByteArray, QByteArray>(QByteArray("WWW-Authenticate"), "NTLM " + data.toUtf8());
priv->parseHttpResponse(headers, /*isProxy = */ false);
QEXPECT_FAIL("with-realm", "NTLM authentication code doesn't extract the realm", Continue);
diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
index 2c2b551257..08938be4d1 100644
--- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
@@ -2240,7 +2240,7 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
QString::fromLatin1("Could not start %1: %2").arg(processExe, serverProcess.errorString())));
while (!serverProcess.canReadLine())
QVERIFY(serverProcess.waitForReadyRead(10000));
- QCOMPARE(serverProcess.readLine().data(), (server.toLatin1() + "\n").data());
+ QCOMPARE(serverProcess.readLine().data(), QByteArray(server.toLatin1() + "\n").data());
// Start client
QProcess clientProcess;
@@ -2250,7 +2250,7 @@ void tst_QTcpSocket::suddenRemoteDisconnect()
QString::fromLatin1("Could not start %1: %2").arg(processExe, clientProcess.errorString())));
while (!clientProcess.canReadLine())
QVERIFY(clientProcess.waitForReadyRead(10000));
- QCOMPARE(clientProcess.readLine().data(), (client.toLatin1() + "\n").data());
+ QCOMPARE(clientProcess.readLine().data(), QByteArray(client.toLatin1() + "\n").data());
// Let them play for a while
qDebug("Running stress test for 5 seconds");
diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
index 7f2e7b68ca..ab1c406708 100644
--- a/tests/benchmarks/corelib/tools/containers-associative/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp
@@ -72,8 +72,8 @@ void tst_associative_containers::insert_data()
const QByteArray sizeString = QByteArray::number(size);
- QTest::newRow(("hash--" + sizeString).constData()) << true << size;
- QTest::newRow(("map--" + sizeString).constData()) << false << size;
+ QTest::newRow(QByteArray("hash--" + sizeString).constData()) << true << size;
+ QTest::newRow(QByteArray("map--" + sizeString).constData()) << false << size;
}
}
@@ -104,8 +104,8 @@ void tst_associative_containers::lookup_data()
const QByteArray sizeString = QByteArray::number(size);
- QTest::newRow(("hash--" + sizeString).constData()) << true << size;
- QTest::newRow(("map--" + sizeString).constData()) << false << size;
+ QTest::newRow(QByteArray("hash--" + sizeString).constData()) << true << size;
+ QTest::newRow(QByteArray("map--" + sizeString).constData()) << false << size;
}
}
diff --git a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
index e42a40b110..43eadb6633 100644
--- a/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
+++ b/tests/benchmarks/corelib/tools/containers-sequential/main.cpp
@@ -176,8 +176,8 @@ void tst_vector_vs_std::insert_int_data()
for (int size = 10; size < 20000; size += 100) {
const QByteArray sizeString = QByteArray::number(size);
- QTest::newRow(("std::vector-int--" + sizeString).constData()) << true << size;
- QTest::newRow(("QVector-int--" + sizeString).constData()) << false << size;
+ QTest::newRow(QByteArray("std::vector-int--" + sizeString).constData()) << true << size;
+ QTest::newRow(QByteArray("QVector-int--" + sizeString).constData()) << false << size;
}
}
@@ -199,8 +199,8 @@ void tst_vector_vs_std::insert_Large_data()
for (int size = 10; size < LARGE_MAX_SIZE; size += 100) {
const QByteArray sizeString = QByteArray::number(size);
- QTest::newRow(("std::vector-Large--" + sizeString).constData()) << true << size;
- QTest::newRow(("QVector-Large--" + sizeString).constData()) << false << size;
+ QTest::newRow(QByteArray("std::vector-Large--" + sizeString).constData()) << true << size;
+ QTest::newRow(QByteArray("QVector-Large--" + sizeString).constData()) << false << size;
}
}
@@ -222,8 +222,8 @@ void tst_vector_vs_std::lookup_int_data()
for (int size = 10; size < 20000; size += 100) {
const QByteArray sizeString = QByteArray::number(size);
- QTest::newRow(("std::vector-int--" + sizeString).constData()) << true << size;
- QTest::newRow(("QVector-int--" + sizeString).constData()) << false << size;
+ QTest::newRow(QByteArray("std::vector-int--" + sizeString).constData()) << true << size;
+ QTest::newRow(QByteArray("QVector-int--" + sizeString).constData()) << false << size;
}
}
@@ -245,8 +245,8 @@ void tst_vector_vs_std::lookup_Large_data()
for (int size = 10; size < LARGE_MAX_SIZE; size += 100) {
const QByteArray sizeString = QByteArray::number(size);
- QTest::newRow(("std::vector-Large--" + sizeString).constData()) << true << size;
- QTest::newRow(("QVector-Large--" + sizeString).constData()) << false << size;
+ QTest::newRow(QByteArray("std::vector-Large--" + sizeString).constData()) << true << size;
+ QTest::newRow(QByteArray("QVector-Large--" + sizeString).constData()) << false << size;
}
}
diff --git a/tests/benchmarks/dbus/qdbustype/main.cpp b/tests/benchmarks/dbus/qdbustype/main.cpp
index 0e0ce358bb..b0f6988425 100644
--- a/tests/benchmarks/dbus/qdbustype/main.cpp
+++ b/tests/benchmarks/dbus/qdbustype/main.cpp
@@ -56,7 +56,7 @@ private Q_SLOTS:
static inline void benchmarkAddRow(const char *name, const char *data)
{
- QTest::newRow(QByteArray("native-") + name) << data << true;
+ QTest::newRow(QByteArray(QByteArray("native-") + name)) << data << true;
QTest::newRow(name) << data << false;
}
diff --git a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
index fcddf5ed90..45acd41749 100644
--- a/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
+++ b/tests/benchmarks/gui/styles/qstylesheetstyle/main.cpp
@@ -153,9 +153,9 @@ void tst_qstylesheetstyle::grid_data()
QTest::addColumn<int>("N");
for (int n = 5; n <= 25; n += 5) {
const QByteArray nString = QByteArray::number(n*n);
- QTest::newRow(("simple--" + nString).constData()) << false << false << n;
- QTest::newRow(("events--" + nString).constData()) << true << false << n;
- QTest::newRow(("show--" + nString).constData()) << true << true << n;
+ QTest::newRow(QByteArray("simple--" + nString).constData()) << false << false << n;
+ QTest::newRow(QByteArray("events--" + nString).constData()) << true << false << n;
+ QTest::newRow(QByteArray("show--" + nString).constData()) << true << true << n;
}
}