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/kernel | |
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/kernel')
-rw-r--r-- | src/network/kernel/qdnslookup_unix.cpp | 6 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo_unix.cpp | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/network/kernel/qdnslookup_unix.cpp b/src/network/kernel/qdnslookup_unix.cpp index 41038dc8da..1da00813ce 100644 --- a/src/network/kernel/qdnslookup_unix.cpp +++ b/src/network/kernel/qdnslookup_unix.cpp @@ -39,7 +39,9 @@ #include "qdnslookup_p.h" +#if QT_CONFIG(library) #include <qlibrary.h> +#endif #include <qscopedpointer.h> #include <qurl.h> #include <private/qnativesocketengine_p.h> @@ -58,7 +60,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_LIBRARY +#if QT_CONFIG(library) #if defined(Q_OS_OPENBSD) typedef struct __res_state* res_state; @@ -382,6 +384,6 @@ void QDnsLookupRunnable::query(const int requestType, const QByteArray &requestN return; } -#endif /* ifndef QT_NO_LIBRARY */ +#endif /* QT_CONFIG(library) */ QT_END_NAMESPACE diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index 7af8db73e0..cf08a15f96 100644 --- a/src/network/kernel/qhostinfo_unix.cpp +++ b/src/network/kernel/qhostinfo_unix.cpp @@ -45,7 +45,9 @@ #include "private/qnativesocketengine_p.h" #include "qiodevice.h" #include <qbytearray.h> +#if QT_CONFIG(library) #include <qlibrary.h> +#endif #include <qbasicatomic.h> #include <qurl.h> #include <qfile.h> @@ -93,7 +95,7 @@ static res_state_ptr local_res = 0; static bool resolveLibraryInternal() { -#if !defined(QT_NO_LIBRARY) && !defined(Q_OS_QNX) +#if QT_CONFIG(library) && !defined(Q_OS_QNX) QLibrary lib; #ifdef LIBRESOLV_SO lib.setFileName(QStringLiteral(LIBRESOLV_SO)); |