diff options
Diffstat (limited to 'src/network')
19 files changed, 121 insertions, 17 deletions
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp index 1fcfebb..f188bd5 100644 --- a/src/network/access/qnetworkaccessbackend.cpp +++ b/src/network/access/qnetworkaccessbackend.cpp @@ -346,6 +346,8 @@ void QNetworkAccessBackend::sslErrors(const QList<QSslError> &errors) #endif } +#ifndef QT_NO_BEARERMANAGEMENT + /*! Starts the backend. Returns true if the backend is started. Returns false if the backend could not be started due to an unopened or roaming session. The caller should recall this @@ -376,5 +378,6 @@ bool QNetworkAccessBackend::start() return false; } +#endif QT_END_NAMESPACE diff --git a/src/network/access/qnetworkaccessbackend_p.h b/src/network/access/qnetworkaccessbackend_p.h index 9bc15e5..4ce37a6 100644 --- a/src/network/access/qnetworkaccessbackend_p.h +++ b/src/network/access/qnetworkaccessbackend_p.h @@ -111,7 +111,9 @@ public: // socket). virtual void open() = 0; +#ifndef QT_NO_BEARERMANAGEMENT virtual bool start(); +#endif virtual void closeDownstreamChannel() = 0; virtual bool waitForDownstreamReadyRead(int msecs) = 0; diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 90afd2c..feb9d99 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -742,6 +742,8 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ return d_func()->postProcess(createRequest(QNetworkAccessManager::DeleteOperation, request)); } +#ifndef QT_NO_BEARERMANAGEMENT + /*! \since 4.7 @@ -858,6 +860,8 @@ QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccess } } +#endif // QT_NO_BEARERMANAGEMENT + /*! \since 4.7 @@ -913,6 +917,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera return new QFileNetworkReply(this, req, op); } +#ifndef QT_NO_BEARERMANAGEMENT // Return a disabled network reply if network access is disabled. // Except if the scheme is empty or file://. if (!d->networkAccessible && !(req.url().scheme() == QLatin1String("file") || @@ -934,6 +939,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera if (d->networkSession) d->networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), -1); +#endif QNetworkRequest request = req; if (!request.header(QNetworkRequest::ContentLengthHeader).isValid() && @@ -951,10 +957,12 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera // first step: create the reply QUrl url = request.url(); QNetworkReplyImpl *reply = new QNetworkReplyImpl(this); +#ifndef QT_NO_BEARERMANAGEMENT if (req.url().scheme() != QLatin1String("file") && !req.url().scheme().isEmpty()) { connect(this, SIGNAL(networkSessionConnected()), reply, SLOT(_q_networkSessionConnected())); } +#endif QNetworkReplyImplPrivate *priv = reply->d_func(); priv->manager = this; @@ -994,8 +1002,10 @@ void QNetworkAccessManagerPrivate::_q_replyFinished() if (reply) emit q->finished(reply); +#ifndef QT_NO_BEARERMANAGEMENT if (networkSession && q->findChildren<QNetworkReply *>().count() == 1) networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), 120000); +#endif } void QNetworkAccessManagerPrivate::_q_replySslErrors(const QList<QSslError> &errors) @@ -1248,6 +1258,7 @@ QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate() { } +#ifndef QT_NO_BEARERMANAGEMENT void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &config) { Q_Q(QNetworkAccessManager); @@ -1328,6 +1339,7 @@ void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession } } } +#endif // QT_NO_BEARERMANAGEMENT QT_END_NAMESPACE diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index c57c9c6..a0ffb07 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -62,7 +62,9 @@ class QNetworkReply; class QNetworkProxy; class QNetworkProxyFactory; class QSslError; +#ifndef QT_NO_BEARERMANAGEMENT class QNetworkConfiguration; +#endif class QNetworkReplyImplPrivate; class QNetworkAccessManagerPrivate; @@ -70,7 +72,9 @@ class Q_NETWORK_EXPORT QNetworkAccessManager: public QObject { Q_OBJECT +#ifndef QT_NO_BEARERMANAGEMENT Q_PROPERTY(NetworkAccessibility networkAccessible READ networkAccessible WRITE setNetworkAccessible NOTIFY networkAccessibleChanged) +#endif public: enum Operation { @@ -84,11 +88,13 @@ public: UnknownOperation = 0 }; +#ifndef QT_NO_BEARERMANAGEMENT enum NetworkAccessibility { UnknownAccessibility = -1, NotAccessible = 0, Accessible = 1 }; +#endif explicit QNetworkAccessManager(QObject *parent = 0); ~QNetworkAccessManager(); @@ -115,12 +121,14 @@ public: QNetworkReply *deleteResource(const QNetworkRequest &request); QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = 0); +#ifndef QT_NO_BEARERMANAGEMENT void setConfiguration(const QNetworkConfiguration &config); QNetworkConfiguration configuration() const; QNetworkConfiguration activeConfiguration() const; void setNetworkAccessible(NetworkAccessibility accessible); NetworkAccessibility networkAccessible() const; +#endif Q_SIGNALS: #ifndef QT_NO_NETWORKPROXY @@ -132,9 +140,11 @@ Q_SIGNALS: void sslErrors(QNetworkReply *reply, const QList<QSslError> &errors); #endif +#ifndef QT_NO_BEARERMANAGEMENT void networkSessionConnected(); void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible); +#endif protected: virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, @@ -145,10 +155,12 @@ private: Q_DECLARE_PRIVATE(QNetworkAccessManager) Q_PRIVATE_SLOT(d_func(), void _q_replyFinished()) Q_PRIVATE_SLOT(d_func(), void _q_replySslErrors(QList<QSslError>)) +#ifndef QT_NO_BEARERMANAGEMENT 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)) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionStateChanged(QNetworkSession::State)) +#endif }; QT_END_NAMESPACE diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h index 1785685..695842c 100644 --- a/src/network/access/qnetworkaccessmanager_p.h +++ b/src/network/access/qnetworkaccessmanager_p.h @@ -75,10 +75,12 @@ public: #ifndef QT_NO_NETWORKPROXY proxyFactory(0), #endif +#ifndef QT_NO_BEARERMANAGEMENT networkSession(0), networkAccessible(QNetworkAccessManager::Accessible), online(false), initializeSession(true), +#endif cookieJarCreated(false) { } ~QNetworkAccessManagerPrivate(); @@ -104,6 +106,7 @@ public: QNetworkAccessBackend *findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request); +#ifndef QT_NO_BEARERMANAGEMENT void createSession(const QNetworkConfiguration &config); void _q_networkSessionClosed(); @@ -111,6 +114,7 @@ public: void _q_networkSessionPreferredConfigurationChanged(const QNetworkConfiguration &config, bool isSeamless); void _q_networkSessionStateChanged(QNetworkSession::State state); +#endif // this is the cache for storing downloaded files QAbstractNetworkCache *networkCache; @@ -123,11 +127,13 @@ public: QNetworkProxyFactory *proxyFactory; #endif +#ifndef QT_NO_BEARERMANAGEMENT QNetworkSession *networkSession; QString networkConfiguration; QNetworkAccessManager::NetworkAccessibility networkAccessible; bool online; bool initializeSession; +#endif bool cookieJarCreated; diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index edd6889..c3dc168 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -67,8 +67,6 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate() void QNetworkReplyImplPrivate::_q_startOperation() { - Q_Q(QNetworkReplyImpl); - // ensure this function is only being called once if (state == Working) { qDebug("QNetworkReplyImpl::_q_startOperation was called more than once"); @@ -86,6 +84,7 @@ void QNetworkReplyImplPrivate::_q_startOperation() return; } +#ifndef QT_NO_BEARERMANAGEMENT if (!backend->start()) { // backend failed to start because the session state is not Connected. // QNetworkAccessManager will call reply->backend->start() again for us when the session @@ -95,6 +94,8 @@ void QNetworkReplyImplPrivate::_q_startOperation() QNetworkSession *session = manager->d_func()->networkSession; if (session) { + Q_Q(QNetworkReplyImpl); + QObject::connect(session, SIGNAL(error(QNetworkSession::SessionError)), q, SLOT(_q_networkSessionFailed())); @@ -106,6 +107,7 @@ void QNetworkReplyImplPrivate::_q_startOperation() return; } +#endif if (state != Finished) { if (operation == QNetworkAccessManager::GetOperation) @@ -232,6 +234,7 @@ void QNetworkReplyImplPrivate::_q_bufferOutgoingData() } } +#ifndef QT_NO_BEARERMANAGEMENT void QNetworkReplyImplPrivate::_q_networkSessionConnected() { Q_Q(QNetworkReplyImpl); @@ -272,6 +275,7 @@ void QNetworkReplyImplPrivate::_q_networkSessionFailed() finished(); } } +#endif void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *data) @@ -581,6 +585,7 @@ void QNetworkReplyImplPrivate::finished() totalSize = totalSize.toLongLong() + preMigrationDownloaded; if (!manager.isNull()) { +#ifndef QT_NO_BEARERMANAGEMENT QNetworkSession *session = manager->d_func()->networkSession; if (session && session->state() == QNetworkSession::Roaming && state == Working && errorCode != QNetworkReply::OperationCanceledError) { @@ -600,6 +605,7 @@ void QNetworkReplyImplPrivate::finished() } } } +#endif } resumeNotificationHandling(); @@ -889,6 +895,7 @@ bool QNetworkReplyImplPrivate::migrateBackend() return true; } +#ifndef QT_NO_BEARERMANAGEMENT QDisabledNetworkReply::QDisabledNetworkReply(QObject *parent, const QNetworkRequest &req, QNetworkAccessManager::Operation op) @@ -912,6 +919,7 @@ QDisabledNetworkReply::QDisabledNetworkReply(QObject *parent, QDisabledNetworkReply::~QDisabledNetworkReply() { } +#endif QT_END_NAMESPACE diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h index fcb3397..bc7e408 100644 --- a/src/network/access/qnetworkreplyimpl_p.h +++ b/src/network/access/qnetworkreplyimpl_p.h @@ -99,8 +99,10 @@ public: Q_PRIVATE_SLOT(d_func(), void _q_copyReadChannelFinished()) Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingData()) Q_PRIVATE_SLOT(d_func(), void _q_bufferOutgoingDataFinished()) +#ifndef QT_NO_BEARERMANAGEMENT Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected()) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed()) +#endif }; class QNetworkReplyImplPrivate: public QNetworkReplyPrivate @@ -133,8 +135,10 @@ public: void _q_copyReadChannelFinished(); void _q_bufferOutgoingData(); void _q_bufferOutgoingDataFinished(); +#ifndef QT_NO_BEARERMANAGEMENT void _q_networkSessionConnected(); void _q_networkSessionFailed(); +#endif void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData); @@ -196,6 +200,7 @@ public: Q_DECLARE_PUBLIC(QNetworkReplyImpl) }; +#ifndef QT_NO_BEARERMANAGEMENT class QDisabledNetworkReply : public QNetworkReply { Q_OBJECT @@ -209,6 +214,7 @@ public: protected: qint64 readData(char *, qint64) { return -1; } }; +#endif QT_END_NAMESPACE diff --git a/src/network/bearer/qbearerengine.cpp b/src/network/bearer/qbearerengine.cpp index c42e2d2..2f8624a 100644 --- a/src/network/bearer/qbearerengine.cpp +++ b/src/network/bearer/qbearerengine.cpp @@ -41,6 +41,8 @@ #include "qbearerengine_p.h" +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_NAMESPACE QBearerEngine::QBearerEngine(QObject *parent) @@ -110,4 +112,6 @@ bool QBearerEngine::configurationsInUse() const #include "moc_qbearerengine_p.cpp" +#endif // QT_NO_BEARERMANAGEMENT + QT_END_NAMESPACE diff --git a/src/network/bearer/qbearerengine_p.h b/src/network/bearer/qbearerengine_p.h index fd4bf87..70aa5fa 100644 --- a/src/network/bearer/qbearerengine_p.h +++ b/src/network/bearer/qbearerengine_p.h @@ -65,6 +65,8 @@ #include <QtCore/qsharedpointer.h> #include <QtCore/qmutex.h> +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_NAMESPACE class QNetworkConfiguration; @@ -110,4 +112,6 @@ protected: QT_END_NAMESPACE +#endif // QT_NO_BEARERMANAGEMENT + #endif diff --git a/src/network/bearer/qbearerplugin.cpp b/src/network/bearer/qbearerplugin.cpp index 4509fd0..a5e8918 100644 --- a/src/network/bearer/qbearerplugin.cpp +++ b/src/network/bearer/qbearerplugin.cpp @@ -43,6 +43,8 @@ #include <QtCore/qdebug.h> +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_NAMESPACE QBearerEnginePlugin::QBearerEnginePlugin(QObject *parent) @@ -55,3 +57,5 @@ QBearerEnginePlugin::~QBearerEnginePlugin() } QT_END_NAMESPACE + +#endif // QT_NO_BEARERMANAGEMENT diff --git a/src/network/bearer/qbearerplugin_p.h b/src/network/bearer/qbearerplugin_p.h index 36709c2..9652f14 100644 --- a/src/network/bearer/qbearerplugin_p.h +++ b/src/network/bearer/qbearerplugin_p.h @@ -58,6 +58,8 @@ #include <QtCore/qplugin.h> #include <QtCore/qfactoryinterface.h> +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE @@ -89,5 +91,6 @@ QT_END_NAMESPACE QT_END_HEADER -#endif +#endif // QT_NO_BEARERMANAGEMENT +#endif diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index 1ba5dab..102b347 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -46,6 +46,8 @@ #include <QtCore/qstringlist.h> +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QNetworkConfigurationManagerPrivate, connManager); @@ -278,7 +280,7 @@ bool QNetworkConfigurationManager::isOnline() const */ QNetworkConfigurationManager::Capabilities QNetworkConfigurationManager::capabilities() const { - return connManager()->capFlags; + return connManager()->capabilities(); } /*! @@ -304,3 +306,4 @@ void QNetworkConfigurationManager::updateConfigurations() QT_END_NAMESPACE +#endif // QT_NO_BEARERMANAGEMENT diff --git a/src/network/bearer/qnetworkconfigmanager.h b/src/network/bearer/qnetworkconfigmanager.h index 79bb27c..3e44be1 100644 --- a/src/network/bearer/qnetworkconfigmanager.h +++ b/src/network/bearer/qnetworkconfigmanager.h @@ -49,6 +49,8 @@ #include <QtCore/qobject.h> #include <QtNetwork/qnetworkconfiguration.h> +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_HEADER #ifndef QT_MOBILITY_BEARER @@ -111,5 +113,7 @@ QTM_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_BEARERMANAGEMENT + #endif //QNETWORKCONFIGURATIONMANAGER_H diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index c665fa2..a651dd1 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -50,13 +50,15 @@ #include <QtCore/qthread.h> #include <QtCore/private/qcoreapplication_p.h> +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QBearerEngineFactoryInterface_iid, QLatin1String("/bearer"))) QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate() -: capFlags(0), mutex(QMutex::Recursive), pollTimer(0), forcedPolling(0), firstUpdate(true) +: pollTimer(0), mutex(QMutex::Recursive), forcedPolling(0), firstUpdate(true) { qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration"); @@ -265,6 +267,18 @@ bool QNetworkConfigurationManagerPrivate::isOnline() return !onlineConfigurations.isEmpty(); } +QNetworkConfigurationManager::Capabilities QNetworkConfigurationManagerPrivate::capabilities() +{ + QMutexLocker locker(&mutex); + + QNetworkConfigurationManager::Capabilities capFlags; + + foreach (QBearerEngine *engine, sessionEngines) + capFlags |= engine->capabilities(); + + return capFlags; +} + void QNetworkConfigurationManagerPrivate::configurationAdded(QNetworkConfigurationPrivatePointer ptr) { QMutexLocker locker(&mutex); @@ -367,8 +381,6 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations() connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)), this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer))); - capFlags |= engine->capabilities(); - QMetaObject::invokeMethod(engine, "requestUpdate"); } } @@ -493,3 +505,5 @@ void QNetworkConfigurationManagerPrivate::disablePolling() } QT_END_NAMESPACE + +#endif // QT_NO_BEARERMANAGEMENT diff --git a/src/network/bearer/qnetworkconfigmanager_p.h b/src/network/bearer/qnetworkconfigmanager_p.h index dba9d2c..0649031 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.h +++ b/src/network/bearer/qnetworkconfigmanager_p.h @@ -59,6 +59,8 @@ #include <QtCore/qmutex.h> #include <QtCore/qset.h> +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_NAMESPACE class QBearerEngine; @@ -78,7 +80,7 @@ public: bool isOnline(); - QNetworkConfigurationManager::Capabilities capFlags; + QNetworkConfigurationManager::Capabilities capabilities(); void performAsyncConfigurationUpdate(); @@ -102,19 +104,18 @@ Q_SIGNALS: void abort(); private: - QMutex mutex; - QTimer *pollTimer; + QMutex mutex; + QList<QBearerEngine *> sessionEngines; QSet<QString> onlineConfigurations; - QSet<int> updatingEngines; - bool updating; - QSet<int> pollingEngines; + QSet<int> updatingEngines; int forcedPolling; + bool updating; bool firstUpdate; @@ -130,4 +131,6 @@ Q_NETWORK_EXPORT QNetworkConfigurationManagerPrivate *qNetworkConfigurationManag QT_END_NAMESPACE +#endif // QT_NO_BEARERMANAGEMENT + #endif //QNETWORKCONFIGURATIONMANAGERPRIVATE_H diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h index ccbe670..6e146e0 100644 --- a/src/network/bearer/qnetworkconfiguration_p.h +++ b/src/network/bearer/qnetworkconfiguration_p.h @@ -84,6 +84,8 @@ public: return bearer; } + QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers; + mutable QMutex mutex; QString bearer; @@ -94,8 +96,6 @@ public: QNetworkConfiguration::Type type; QNetworkConfiguration::Purpose purpose; - QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers; - bool isValid; bool roamingSupported; diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 1bba56f..1ed6cbb 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -47,6 +47,8 @@ #include "qnetworkconfigmanager_p.h" #include "qnetworksession_p.h" +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_NAMESPACE /*! @@ -225,6 +227,10 @@ QT_BEGIN_NAMESPACE QNetworkSession::QNetworkSession(const QNetworkConfiguration& connectionConfig, QObject* parent) : QObject(parent), d(0) { + // invalid configuration + if (connectionConfig.identifier().isNull()) + return; + foreach (QBearerEngine *engine, qNetworkConfigurationManagerPrivate()->engines()) { if (engine->hasIdentifier(connectionConfig.identifier())) { d = engine->createSessionBackend(); @@ -702,3 +708,5 @@ void QNetworkSession::disconnectNotify(const char *signal) #include "moc_qnetworksession.cpp" QT_END_NAMESPACE + +#endif // QT_NO_BEARERMANAGEMENT diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h index 2911d0a..e7fffac 100644 --- a/src/network/bearer/qnetworksession.h +++ b/src/network/bearer/qnetworksession.h @@ -48,6 +48,8 @@ #include <QtCore/qvariant.h> #include <QtNetwork/qnetworkconfiguration.h> +#ifndef QT_NO_BEARERMANAGEMENT + #if defined(Q_OS_WIN) && defined(interface) #undef interface #endif @@ -149,4 +151,6 @@ QTM_END_NAMESPACE QT_END_HEADER +#endif // QT_NO_BEARERMANAGEMENT + #endif //QNETWORKSESSION_H diff --git a/src/network/bearer/qnetworksession_p.h b/src/network/bearer/qnetworksession_p.h index a341eaf..c7b5718 100644 --- a/src/network/bearer/qnetworksession_p.h +++ b/src/network/bearer/qnetworksession_p.h @@ -56,6 +56,8 @@ #include "qnetworksession.h" #include "qnetworkconfiguration_p.h" +#ifndef QT_NO_BEARERMANAGEMENT + QT_BEGIN_NAMESPACE class Q_NETWORK_EXPORT QNetworkSessionPrivate : public QObject @@ -126,6 +128,8 @@ Q_SIGNALS: void preferredConfigurationChanged(const QNetworkConfiguration &config, bool isSeamless); protected: + QNetworkSession *q; + // The config set on QNetworkSession. QNetworkConfiguration publicConfig; @@ -140,11 +144,11 @@ protected: QNetworkSession::State state; bool isOpen; - - QNetworkSession *q; }; QT_END_NAMESPACE +#endif // QT_NO_BEARERMANAGEMENT + #endif //QNETWORKSESSIONPRIVATE_H |