From 3f98ff474f24604c79a2fcc645697ca30fc444de Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 26 Apr 2021 09:45:31 +0200 Subject: 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 --- tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/auto/network') 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 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() -- cgit v1.2.3