From 3f91cde588ad32277ba06d625ed36256ec65f88e Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 20 Feb 2012 17:02:41 +0000 Subject: Test for QT_NO_SSL instead of QT_NO_OPENSSL Change the ifdefs in our own code (except openssl backend) to use the new configure flag. Change-Id: I8774734771c66b22164b5fae8fdb27814ac3df7b Reviewed-by: Richard J. Moore --- tests/auto/other/networkselftest/tst_networkselftest.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/auto/other/networkselftest') diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp index 99d4ac9522..841df6e1f0 100644 --- a/tests/auto/other/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp @@ -80,7 +80,7 @@ private slots: void httpServerFiles(); void httpServerCGI_data(); void httpServerCGI(); -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL void httpsServer(); #endif void httpProxy(); @@ -188,14 +188,14 @@ static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000) { -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL QSslSocket *sslSocket = qobject_cast(socket); #endif QTime timer; timer.start(); forever { if (socket->bytesToWrite() == 0 -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL && sslSocket->encryptedBytesToWrite() == 0 #endif ) @@ -210,7 +210,7 @@ static bool doSocketFlush(QTcpSocket *socket, int timeout = 4000) static void netChat(int port, const QList &chat) { -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL QSslSocket socket; #else QTcpSocket socket; @@ -322,7 +322,7 @@ static void netChat(int port, const QList &chat) break; case Chat::StartEncryption: -#ifdef QT_NO_OPENSSL +#ifdef QT_NO_SSL QFAIL("Internal error: SSL required for this test"); #else qDebug() << i << "Starting client encryption"; @@ -745,7 +745,7 @@ void tst_NetworkSelfTest::httpServerCGI() netChat(80, chat); } -#ifndef QT_NO_OPENSSL +#ifndef QT_NO_SSL void tst_NetworkSelfTest::httpsServer() { netChat(443, QList() @@ -937,7 +937,7 @@ void tst_NetworkSelfTest::socks5ProxyAuth() void tst_NetworkSelfTest::supportsSsl() { -#ifdef QT_NO_OPENSSL +#ifdef QT_NO_SSL QFAIL("SSL not compiled in"); #else QVERIFY2(QSslSocket::supportsSsl(), "Could not load SSL libraries"); -- cgit v1.2.3