summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpthreaddelegate.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2020-02-18 09:26:53 +0100
committerLiang Qi <liang.qi@qt.io>2020-02-18 22:13:18 +0100
commitfd49b4a2b935362fa76ce3297576addf459bf120 (patch)
tree1c5a4e3efa6d08908e1856abf7ec414105aa818e /src/network/access/qhttpthreaddelegate.cpp
parent9029c5586460950b4fa6773a5d08c67e5ba16e8a (diff)
parentb9585277e78f0571933706507ba2024c68d6df19 (diff)
Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
Diffstat (limited to 'src/network/access/qhttpthreaddelegate.cpp')
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index 7757fb9503a..dcc8c9337ea 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -428,6 +428,12 @@ void QHttpThreadDelegate::startRequest()
connect(httpReply, SIGNAL(cacheCredentials(QHttpNetworkRequest,QAuthenticator*)),
this, SLOT(cacheCredentialsSlot(QHttpNetworkRequest,QAuthenticator*)));
+ if (httpReply->errorCode() != QNetworkReply::NoError) {
+ if (synchronous)
+ synchronousFinishedWithErrorSlot(httpReply->errorCode(), httpReply->errorString());
+ else
+ finishedWithErrorSlot(httpReply->errorCode(), httpReply->errorString());
+ }
}
// This gets called from the user thread or by the synchronous HTTP timeout timer