QNetworkReplyHttpImpl::_q_startOperation - remove a useless warning
Since it explains nothing and now, after some other bug was fixed (see, for example, c89d0f9d532), we trigger this message on the first request, which happens because: - 'createSession()' indeed, creates a session, compares a previous kwnon state (which happens to be 'Invalid') with a current state, which is 'Connected' and then invokes '_q_networkSessionStateChanged'. - '_q_networkSessionStateChanged()' on 'Connected' emits 'networkSessionConnected()' to which a newly-created QNetworkReplyHttpImpl will respond with it's _q_startOperation(). - QHttpNetworkReplyImpl will also try to 'open' a session, its 'opened()' signal will trigger, again, 'networkSessionConnected()' and ... the next _q_startOperation(). Now, not to add even more twisted spaghetti if/conditions with some unpredictable regressions, let's suppress a useless warning and silently return. We, indeed, in 'Working' state, let's keep working. Task-number: QTBUG-72463 Change-Id: I5282979920915ffded889c20b8ae740a46efef04 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
56e92dfdf2
commit
78b422c341
@ -1879,11 +1879,9 @@ void QNetworkReplyHttpImplPrivate::_q_startOperation()
|
||||
{
|
||||
Q_Q(QNetworkReplyHttpImpl);
|
||||
|
||||
// ensure this function is only being called once
|
||||
if (state == Working) {
|
||||
qDebug() << "QNetworkReplyHttpImplPrivate::_q_startOperation was called more than once" << url;
|
||||
if (state == Working) // ensure this function is only being called once
|
||||
return;
|
||||
}
|
||||
|
||||
state = Working;
|
||||
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
|
Loading…
x
Reference in New Issue
Block a user