QNAM: Fix double-connect for manual redirect handling
The other signal connections are broken because we create a new delegate. But 'q' is still the same, so we should not connect to it a second time. Just connect it in the constructor instead. Fixes: QDS-9687 Pick-to: 6.5 6.2 5.15 Change-Id: Id47492c2e734087281a3d3488649471814fd981d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>bb10
parent
968250ee14
commit
c69a5611ae
|
|
@ -154,6 +154,9 @@ QNetworkReplyHttpImpl::QNetworkReplyHttpImpl(QNetworkAccessManager* const manage
|
|||
d->sslConfiguration.reset(new QSslConfiguration(request.sslConfiguration()));
|
||||
#endif
|
||||
|
||||
QObjectPrivate::connect(this, &QNetworkReplyHttpImpl::redirectAllowed, d,
|
||||
&QNetworkReplyHttpImplPrivate::followRedirect, Qt::QueuedConnection);
|
||||
|
||||
// FIXME Later maybe set to Unbuffered, especially if it is zerocopy or from cache?
|
||||
QIODevice::open(QIODevice::ReadOnly);
|
||||
|
||||
|
|
@ -870,9 +873,6 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq
|
|||
q, SLOT(onRedirected(QUrl,int,int)),
|
||||
Qt::QueuedConnection);
|
||||
|
||||
QObject::connect(q, SIGNAL(redirectAllowed()), q, SLOT(followRedirect()),
|
||||
Qt::QueuedConnection);
|
||||
|
||||
#ifndef QT_NO_SSL
|
||||
QObject::connect(delegate, SIGNAL(sslConfigurationChanged(QSslConfiguration)),
|
||||
q, SLOT(replySslConfigurationChanged(QSslConfiguration)),
|
||||
|
|
|
|||
Loading…
Reference in New Issue