From 48c408667580f8c10afcc3579d67a7ae62544396 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Mon, 17 Mar 2014 15:34:35 +0100 Subject: fix compilation with QT_NO_NETWORKPROXY Change-Id: Ice7ad51cbbde0ef2459642309c32dd392463754d Reviewed-by: Andrew Knight --- src/websockets/qwebsocket.h | 1 + src/websockets/qwebsocket_p.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/websockets/qwebsocket.h b/src/websockets/qwebsocket.h index c6de981..bf85cc0 100644 --- a/src/websockets/qwebsocket.h +++ b/src/websockets/qwebsocket.h @@ -43,6 +43,7 @@ #define QWEBSOCKET_H #include +#include #ifndef QT_NO_NETWORKPROXY #include #endif diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp index 6770388..fb6486e 100644 --- a/src/websockets/qwebsocket_p.cpp +++ b/src/websockets/qwebsocket_p.cpp @@ -79,8 +79,9 @@ QWebSocketConfiguration::QWebSocketConfiguration() : m_ignoreSslErrors(false), #endif #ifndef QT_NO_NETWORKPROXY - m_proxy(QNetworkProxy::DefaultProxy) + m_proxy(QNetworkProxy::DefaultProxy), #endif + m_pSocket(Q_NULLPTR) { } @@ -541,8 +542,10 @@ void QWebSocketPrivate::makeConnections(const QTcpSocket *pTcpSocket) QObject::connect(pTcpSocket, static_cast(&QAbstractSocket::error), q, static_cast(&QWebSocket::error)); +#ifndef QT_NO_NETWORKPROXY QObject::connect(pTcpSocket, &QAbstractSocket::proxyAuthenticationRequired, q, &QWebSocket::proxyAuthenticationRequired); +#endif QObject::connect(pTcpSocket, &QAbstractSocket::readChannelFinished, q, &QWebSocket::readChannelFinished); QObject::connect(pTcpSocket, &QAbstractSocket::aboutToClose, q, &QWebSocket::aboutToClose); -- cgit v1.2.3