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>
This commit is contained in:
Volker Hilsheimer 2021-04-26 09:45:31 +02:00
parent 63a812b851
commit 3f98ff474f

View File

@ -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()