Fix QtNetwork compilation for -qconfig large
authorTasuku Suzuki <tasuku.suzuki@nokia.com>
Sun, 20 May 2012 12:42:36 +0000 (21:42 +0900)
committerQt by Nokia <qt-info@nokia.com>
Mon, 21 May 2012 11:00:23 +0000 (13:00 +0200)
Disables two variables completely in QNetworkProxy

Change-Id: I76483310b37032c44a25e05fb879de1e9d5282f5
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
src/network/kernel/qnetworkproxy.cpp

index 50bf670..7a10ecf 100644 (file)
@@ -246,8 +246,12 @@ public:
         : mutex(QMutex::Recursive)
         , applicationLevelProxy(0)
         , applicationLevelProxyFactory(0)
+#ifndef QT_NO_SOCKS5
         , socks5SocketEngineHandler(0)
+#endif
+#ifndef QT_NO_HTTP
         , httpSocketEngineHandler(0)
+#endif
     {
 #ifndef QT_NO_SOCKS5
         socks5SocketEngineHandler = new QSocks5SocketEngineHandler();
@@ -261,8 +265,12 @@ public:
     {
         delete applicationLevelProxy;
         delete applicationLevelProxyFactory;
+#ifndef QT_NO_SOCKS5
         delete socks5SocketEngineHandler;
+#endif
+#ifndef QT_NO_HTTP
         delete httpSocketEngineHandler;
+#endif
     }
 
     void setApplicationProxy(const QNetworkProxy &proxy)
@@ -297,8 +305,12 @@ private:
     QMutex mutex;
     QNetworkProxy *applicationLevelProxy;
     QNetworkProxyFactory *applicationLevelProxyFactory;
+#ifndef QT_NO_SOCKS5
     QSocks5SocketEngineHandler *socks5SocketEngineHandler;
+#endif
+#ifndef QT_NO_HTTP
     QHttpSocketEngineHandler *httpSocketEngineHandler;
+#endif
 };
 
 QList<QNetworkProxy> QGlobalNetworkProxy::proxyForQuery(const QNetworkProxyQuery &query)