Connect usagePoliciesChanged signal to the QNetworkReply
Change-Id: Ibb8ba0b3226e402dfa9a5a1a64faa80702b11dd7 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
This commit is contained in:
parent
96fe7dad38
commit
a1e961705c
@ -1564,6 +1564,8 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
|
||||
if (session) {
|
||||
QObject::connect(session, SIGNAL(error(QNetworkSession::SessionError)),
|
||||
q, SLOT(_q_networkSessionFailed()));
|
||||
QObject::connect(session, SIGNAL(usagePoliciesChanged(QNetworkSession::UsagePolicies)),
|
||||
q, SLOT(_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies)));
|
||||
|
||||
if (!session->isOpen()) {
|
||||
session->setSessionProperty(QStringLiteral("ConnectInBackground"), isBackground);
|
||||
@ -1764,6 +1766,11 @@ void QNetworkReplyHttpImplPrivate::_q_networkSessionFailed()
|
||||
finished();
|
||||
}
|
||||
}
|
||||
|
||||
void QNetworkReplyHttpImplPrivate::_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include <private/qbytedata_p.h>
|
||||
#include <private/qnetworkreply_p.h>
|
||||
#include <QtNetwork/QNetworkProxy>
|
||||
#include <QtNetwork/QNetworkSession>
|
||||
|
||||
#ifndef QT_NO_SSL
|
||||
#include <QtNetwork/QSslConfiguration>
|
||||
@ -102,6 +103,7 @@ public:
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies))
|
||||
#endif
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_finished())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_error(QNetworkReply::NetworkError, const QString &))
|
||||
@ -173,6 +175,7 @@ public:
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
void _q_networkSessionConnected();
|
||||
void _q_networkSessionFailed();
|
||||
void _q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies);
|
||||
#endif
|
||||
void _q_finished();
|
||||
|
||||
|
@ -114,6 +114,8 @@ void QNetworkReplyImplPrivate::_q_startOperation()
|
||||
|
||||
QObject::connect(session.data(), SIGNAL(error(QNetworkSession::SessionError)),
|
||||
q, SLOT(_q_networkSessionFailed()));
|
||||
QObject::connect(session.data(), SIGNAL(usagePoliciesChanged(QNetworkSession::UsagePolicies)),
|
||||
q, SLOT(_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies)));
|
||||
|
||||
if (!session->isOpen()) {
|
||||
session->setSessionProperty(QStringLiteral("ConnectInBackground"), isBackground);
|
||||
@ -318,6 +320,11 @@ void QNetworkReplyImplPrivate::_q_networkSessionFailed()
|
||||
finished();
|
||||
}
|
||||
}
|
||||
|
||||
void QNetworkReplyImplPrivate::_q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const QNetworkRequest &req,
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include "private/qringbuffer_p.h"
|
||||
#include "private/qbytedata_p.h"
|
||||
#include <QSharedPointer>
|
||||
#include <QtNetwork/QNetworkSession>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -96,6 +97,7 @@ public:
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies))
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_SSL
|
||||
@ -140,6 +142,7 @@ public:
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
void _q_networkSessionConnected();
|
||||
void _q_networkSessionFailed();
|
||||
void _q_networkSessionUsagePoliciesChanged(QNetworkSession::UsagePolicies);
|
||||
#endif
|
||||
|
||||
void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request,
|
||||
|
Loading…
Reference in New Issue
Block a user