From 864e9963843f209f61c72123df05743bcbf1e139 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Thu, 17 May 2012 05:01:36 +0900 Subject: [PATCH] Fix QtNetwork compilation for -qconfig large Change-Id: I231272e59101e9492a7a1edbacab165b96927877 Reviewed-by: Shane Kearns --- src/corelib/global/qfeatures.h | 2 +- src/corelib/global/qfeatures.txt | 2 +- src/network/access/qnetworkaccessmanager.cpp | 2 ++ src/network/access/qnetworkaccessmanager_p.h | 3 ++- src/network/access/qnetworkreplyimpl.cpp | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index 54c1be8..12d5980 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -377,7 +377,7 @@ #endif // Bearer Management -#if !defined(QT_NO_BEARERMANAGEMENT) && (defined(QT_NO_LIBRARY)) +#if !defined(QT_NO_BEARERMANAGEMENT) && (defined(QT_NO_LIBRARY) || defined(QT_NO_PROPERTIES)) #define QT_NO_BEARERMANAGEMENT #endif diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 20ca9c2..b21da67 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -1049,7 +1049,7 @@ SeeAlso: ??? Feature: BEARERMANAGEMENT Description: Provides bearer management support Section: Networking -Requires: LIBRARY NETWORKINTERFACE +Requires: LIBRARY NETWORKINTERFACE PROPERTIES Name: Bearer Management SeeAlso: ??? diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 66d8a66..f27c38c 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -416,7 +416,9 @@ QNetworkAccessManager::QNetworkAccessManager(QObject *parent) qRegisterMetaType("QSslConfiguration"); #endif qRegisterMetaType > >("QList >"); +#ifndef QT_NO_HTTP qRegisterMetaType("QHttpNetworkRequest"); +#endif qRegisterMetaType("QNetworkReply::NetworkError"); qRegisterMetaType >("QSharedPointer"); } diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h index 8d62e78..08c0e72 100644 --- a/src/network/access/qnetworkaccessmanager_p.h +++ b/src/network/access/qnetworkaccessmanager_p.h @@ -162,8 +162,9 @@ public: static inline QNetworkAccessCache *getObjectCache(QNetworkAccessBackend *backend) { return &backend->manager->objectCache; } Q_AUTOTEST_EXPORT static void clearCache(QNetworkAccessManager *manager); +#ifndef QT_NO_BEARERMANAGEMENT Q_AUTOTEST_EXPORT static const QWeakPointer getNetworkSession(const QNetworkAccessManager *manager); - +#endif Q_DECLARE_PUBLIC(QNetworkAccessManager) }; diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index c5f26df..377f257 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -136,11 +136,13 @@ void QNetworkReplyImplPrivate::_q_startOperation() return; } +#ifndef QT_NO_BEARERMANAGEMENT if (session) { //get notification of policy changes. QObject::connect(session.data(), SIGNAL(usagePoliciesChanged(QNetworkSession::UsagePolicies)), q, SLOT(_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies))); } +#endif if (backend && backend->isSynchronous()) { state = Finished; -- 2.7.4