diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-12-19 10:34:32 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-03-06 11:27:20 +0000 |
commit | d6330a19b29ebff359a6746250c78437dbcaf77d (patch) | |
tree | 3ab0e390f0bfd30bb235ed5a0128bfd33e9cd4b7 /src/network/ssl/qsslsocket_openssl.cpp | |
parent | f31dbeb4c7cd0d7559a8d7f523a3feea7d376186 (diff) |
Use QT_CONFIG(library) instead of QT_NO_LIBRARY
For the windows file system engine, we add an extra macro to use
library loading if configured to do so, but avoid it on WinRT, as
none of the symbols would be found.
We also QT_REQUIRE_CONFIG(library) in the library headers and
exclude the sources from the build if library loading is disabled.
This, in turn, makes it necessary to clean up some header inclusions.
Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/network/ssl/qsslsocket_openssl.cpp')
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index aca7507d13..644dfdb6a8 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -78,7 +78,6 @@ #include <QtCore/qthread.h> #include <QtCore/qurl.h> #include <QtCore/qvarlengtharray.h> -#include <QLibrary> // for loading the security lib for the CA store #include <string.h> @@ -530,7 +529,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded() resetDefaultCiphers(); resetDefaultEllipticCurves(); -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) //load symbols needed to receive certificates from system store #if defined(Q_OS_WIN) HINSTANCE hLib = LoadLibraryW(L"Crypt32"); @@ -558,7 +557,7 @@ void QSslSocketPrivate::ensureCiphersAndCertsLoaded() } } #endif -#endif //QT_NO_LIBRARY +#endif // QT_CONFIG(library) // if on-demand loading was not enabled, load the certs now if (!s_loadRootCertsOnDemand) setDefaultCaCertificates(systemCaCertificates()); |