summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-11-23 12:31:27 +0100
committerUlf Hermann <ulf.hermann@qt.io>2017-11-06 09:39:57 +0000
commit1a0b4b9f26e16532cc3d5532e25d886426ce994e (patch)
treec48977079231dcbaf2186874cc93e2f313867501 /src/network/kernel
parentba3a26ea9f6206276e9f54c9c1efeea30a73c0c4 (diff)
Modernize use of 'http' feature
Exclude QHttp(Multi)Part from being built if http is disabled, and replace the exclusion macros. Use the qmake project files to exclude source files, and QT_REQUIRE_CONFIG(http) in headers. Change-Id: I432fa3c78aa97b5ed2eb1027ac1dc3bdb134f9ba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qnetworkproxy.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 6b53b4b58e..3646a9526a 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -230,7 +230,11 @@
#if QT_CONFIG(socks5)
#include "private/qsocks5socketengine_p.h"
#endif
+
+#if QT_CONFIG(http)
#include "private/qhttpsocketengine_p.h"
+#endif
+
#include "qauthenticator.h"
#include "qdebug.h"
#include "qmutex.h"
@@ -256,7 +260,7 @@ public:
#if QT_CONFIG(socks5)
, socks5SocketEngineHandler(0)
#endif
-#ifndef QT_NO_HTTP
+#if QT_CONFIG(http)
, httpSocketEngineHandler(0)
#endif
#ifdef QT_USE_SYSTEM_PROXIES
@@ -268,7 +272,7 @@ public:
#if QT_CONFIG(socks5)
socks5SocketEngineHandler = new QSocks5SocketEngineHandler();
#endif
-#ifndef QT_NO_HTTP
+#if QT_CONFIG(http)
httpSocketEngineHandler = new QHttpSocketEngineHandler();
#endif
}
@@ -280,7 +284,7 @@ public:
#if QT_CONFIG(socks5)
delete socks5SocketEngineHandler;
#endif
-#ifndef QT_NO_HTTP
+#if QT_CONFIG(http)
delete httpSocketEngineHandler;
#endif
}
@@ -340,7 +344,7 @@ private:
#if QT_CONFIG(socks5)
QSocks5SocketEngineHandler *socks5SocketEngineHandler;
#endif
-#ifndef QT_NO_HTTP
+#if QT_CONFIG(http)
QHttpSocketEngineHandler *httpSocketEngineHandler;
#endif
bool useSystemProxies;