From 9f37f96fa715038a6f0164099c001d8c302671d8 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 28 Apr 2010 11:02:18 +1000 Subject: Fix compatibility with Qt Mobility. Applications which are built against Qt 4.7 but choose to use the bearer management module from Qt Mobility do not get to set/get the network configuration used by QNAM. --- src/network/access/qnetworkaccessmanager.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index a0ffb07..95e45f0 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -62,7 +62,7 @@ class QNetworkReply; class QNetworkProxy; class QNetworkProxyFactory; class QSslError; -#ifndef QT_NO_BEARERMANAGEMENT +#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) class QNetworkConfiguration; #endif @@ -121,11 +121,13 @@ public: QNetworkReply *deleteResource(const QNetworkRequest &request); QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = 0); -#ifndef QT_NO_BEARERMANAGEMENT +#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) void setConfiguration(const QNetworkConfiguration &config); QNetworkConfiguration configuration() const; QNetworkConfiguration activeConfiguration() const; +#endif +#ifndef QT_NO_BEARERMANAGEMENT void setNetworkAccessible(NetworkAccessibility accessible); NetworkAccessibility networkAccessible() const; #endif @@ -140,9 +142,11 @@ Q_SIGNALS: void sslErrors(QNetworkReply *reply, const QList &errors); #endif -#ifndef QT_NO_BEARERMANAGEMENT +#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) void networkSessionConnected(); +#endif +#ifndef QT_NO_BEARERMANAGEMENT void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible); #endif @@ -155,7 +159,7 @@ private: Q_DECLARE_PRIVATE(QNetworkAccessManager) Q_PRIVATE_SLOT(d_func(), void _q_replyFinished()) Q_PRIVATE_SLOT(d_func(), void _q_replySslErrors(QList)) -#ifndef QT_NO_BEARERMANAGEMENT +#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionClosed()) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionNewConfigurationActivated()) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionPreferredConfigurationChanged(QNetworkConfiguration,bool)) -- cgit v0.12