Skip to content

Commit

Permalink
Remove SSL includes from qhttpnetworkconnection_p.h
Browse files Browse the repository at this point in the history
On Windows, qsslcontext_openssl_p.h pulls in an unsanitized
windows.h, causing the infamous min/max macros to be defined,
requiring a #define NOMINMAX in qhttp2protocolhandler.cpp.

This in turn breaks the MinGW developer build since that has
NOMINMAX globally defined:

access\qhttp2protocolhandler.cpp:40:0: error: "NOMINMAX" redefined [-Werror]

Remove the include, adding missing forward declarations and include
directives to the source files.

Change-Id: Ic1c2c711d87599b15ad6e2d87eae7153a44ace47
Reviewed-by: Timur Pocheptsov <[email protected]>
  • Loading branch information
FriedemannKleint committed Jul 12, 2016
1 parent ca9ed96 commit ff11c36
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/network/access/qhttp2protocolhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
**
****************************************************************************/

#define NOMINMAX

#include "qhttpnetworkconnection_p.h"
#include "qhttp2protocolhandler_p.h"

Expand Down
1 change: 1 addition & 0 deletions src/network/access/qhttpnetworkconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
# include <QtNetwork/qsslkey.h>
# include <QtNetwork/qsslcipher.h>
# include <QtNetwork/qsslconfiguration.h>
# include <QtNetwork/qsslerror.h>
#endif


Expand Down
15 changes: 4 additions & 11 deletions src/network/access/qhttpnetworkconnection_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,17 @@

#ifndef QT_NO_HTTP

#ifndef QT_NO_SSL
#ifndef QT_NO_OPENSSL
# include <private/qsslcontext_openssl_p.h>
#endif
# include <private/qsslsocket_p.h>
# include <QtNetwork/qsslsocket.h>
# include <QtNetwork/qsslerror.h>
#else
# include <QtNetwork/qtcpsocket.h>
#endif

QT_BEGIN_NAMESPACE

class QHttpNetworkRequest;
class QHttpNetworkReply;
class QHttpThreadDelegate;
class QByteArray;
class QHostInfo;
#ifndef QT_NO_SSL
class QSslConfiguration;
class QSslContext;
#endif // !QT_NO_SSL

class QHttpNetworkConnectionPrivate;
class Q_AUTOTEST_EXPORT QHttpNetworkConnection : public QObject
Expand Down
1 change: 1 addition & 0 deletions src/network/access/qhttpnetworkconnectionchannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <private/qspdyprotocolhandler_p.h>

#ifndef QT_NO_SSL
# include <private/qsslsocket_p.h>
# include <QtNetwork/qsslkey.h>
# include <QtNetwork/qsslcipher.h>
# include <QtNetwork/qsslconfiguration.h>
Expand Down

0 comments on commit ff11c36

Please sign in to comment.