diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-01-02 13:11:47 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2019-01-08 11:18:18 +0000 |
commit | 78b422c3415d99713cac98137a9ebad6571eb937 (patch) | |
tree | ad031bc87f47d57a2d2697ea6cf6511110521c53 /src | |
parent | 56e92dfdf255231aff0034d2e197fd096da7f0c0 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index ed2235ad28..ef54c198ba 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -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 |