From 1a0b4b9f26e16532cc3d5532e25d886426ce994e Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 23 Nov 2016 12:31:27 +0100 Subject: 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 Reviewed-by: Oswald Buddenhagen --- src/network/access/access.pri | 59 ++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 26 deletions(-) (limited to 'src/network/access/access.pri') diff --git a/src/network/access/access.pri b/src/network/access/access.pri index e8669dcec8..1d6a04a424 100644 --- a/src/network/access/access.pri +++ b/src/network/access/access.pri @@ -1,14 +1,6 @@ # Qt network access module HEADERS += \ - access/qhttpnetworkheader_p.h \ - access/qhttpnetworkrequest_p.h \ - access/qhttpnetworkreply_p.h \ - access/qhttpnetworkconnection_p.h \ - access/qhttpnetworkconnectionchannel_p.h \ - access/qabstractprotocolhandler_p.h \ - access/qhttpprotocolhandler_p.h \ - access/qspdyprotocolhandler_p.h \ access/qnetworkaccessauthenticationmanager_p.h \ access/qnetworkaccessmanager.h \ access/qnetworkaccessmanager_p.h \ @@ -27,28 +19,15 @@ HEADERS += \ access/qnetworkreply_p.h \ access/qnetworkreplyimpl_p.h \ access/qnetworkreplydataimpl_p.h \ - access/qnetworkreplyhttpimpl_p.h \ access/qnetworkreplyfileimpl_p.h \ access/qabstractnetworkcache_p.h \ access/qabstractnetworkcache.h \ - access/qhttpthreaddelegate_p.h \ - access/qhttpmultipart.h \ - access/qhttpmultipart_p.h \ access/qnetworkfile_p.h \ - access/qhttp2protocolhandler_p.h \ access/qhsts_p.h \ access/qhstspolicy.h \ access/qhstsstore_p.h SOURCES += \ - access/qhttpnetworkheader.cpp \ - access/qhttpnetworkrequest.cpp \ - access/qhttpnetworkreply.cpp \ - access/qhttpnetworkconnection.cpp \ - access/qhttpnetworkconnectionchannel.cpp \ - access/qabstractprotocolhandler.cpp \ - access/qhttpprotocolhandler.cpp \ - access/qspdyprotocolhandler.cpp \ access/qnetworkaccessauthenticationmanager.cpp \ access/qnetworkaccessmanager.cpp \ access/qnetworkaccesscache.cpp \ @@ -62,13 +41,9 @@ SOURCES += \ access/qnetworkreply.cpp \ access/qnetworkreplyimpl.cpp \ access/qnetworkreplydataimpl.cpp \ - access/qnetworkreplyhttpimpl.cpp \ access/qnetworkreplyfileimpl.cpp \ access/qabstractnetworkcache.cpp \ - access/qhttpthreaddelegate.cpp \ - access/qhttpmultipart.cpp \ access/qnetworkfile.cpp \ - access/qhttp2protocolhandler.cpp \ access/qhsts.cpp \ access/qhstspolicy.cpp \ access/qhstsstore.cpp @@ -94,4 +69,36 @@ qtConfig(networkdiskcache) { mac: LIBS_PRIVATE += -framework Security include($$PWD/../../3rdparty/zlib_dependency.pri) -include($$PWD/http2/http2.pri) + +qtConfig(http) { + include($$PWD/http2/http2.pri) + + SOURCES += \ + access/qabstractprotocolhandler.cpp \ + access/qhttp2protocolhandler.cpp \ + access/qhttpmultipart.cpp \ + access/qhttpnetworkconnection.cpp \ + access/qhttpnetworkconnectionchannel.cpp \ + access/qhttpnetworkheader.cpp \ + access/qhttpnetworkreply.cpp \ + access/qhttpnetworkrequest.cpp \ + access/qhttpprotocolhandler.cpp \ + access/qhttpthreaddelegate.cpp \ + access/qnetworkreplyhttpimpl.cpp \ + access/qspdyprotocolhandler.cpp + + HEADERS += \ + access/qabstractprotocolhandler_p.h \ + access/qhttp2protocolhandler_p.h \ + access/qhttpmultipart.h \ + access/qhttpmultipart_p.h \ + access/qhttpnetworkconnection_p.h \ + access/qhttpnetworkconnectionchannel_p.h \ + access/qhttpnetworkheader_p.h \ + access/qhttpnetworkreply_p.h \ + access/qhttpnetworkrequest_p.h \ + access/qhttpprotocolhandler_p.h \ + access/qhttpthreaddelegate_p.h \ + access/qnetworkreplyhttpimpl_p.h \ + access/qspdyprotocolhandler_p.h +} -- cgit v1.2.3