summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-26 09:45:31 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-26 14:44:51 +0200
commit3f98ff474f24604c79a2fcc645697ca30fc444de (patch)
treea71eaa4df3c93b9d2244990802b6a6178c060419 /tests/auto/network
parent63a812b85191c9cfe0704d400df86ce7961dea12 (diff)
Fix linking on Windows when SSL is not configured
The qt_ForceTlsSecurityLevel symbol is not defined if SSL is not configured, so don't use it in the QNetworkReply test if it's not. Change-Id: Id3110a1997fea1648b48bfc411e90e7efe306678 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/network')
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 6a326f8c5a..1e60b5d8c3 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -107,10 +107,12 @@ Q_DECLARE_METATYPE(QNetworkProxyQuery)
typedef QSharedPointer<QNetworkReply> QNetworkReplyPtr;
+#if QT_CONFIG(ssl)
QT_BEGIN_NAMESPACE
// Technically, a workaround, and only needed for OpenSSL:
void qt_ForceTlsSecurityLevel();
QT_END_NAMESPACE
+#endif
class MyCookieJar;
class tst_QNetworkReply: public QObject
@@ -1586,8 +1588,9 @@ void tst_QNetworkReply::initTestCase()
QString::fromLatin1("Couldn't find echo dir starting from %1.").arg(QDir::currentPath())));
cleanupTestData();
-
+#if QT_CONFIG(ssl)
QT_PREPEND_NAMESPACE(qt_ForceTlsSecurityLevel)();
+#endif
}
void tst_QNetworkReply::cleanupTestCase()