QHttpThreadDelegate : Fix QHttpThreadDelegate don't read response data about Synchronous error reply.

The App might use response data of Synchronous 401 reply. (example : specific error info of code, string as json)
so, Added a function to read it for Sync.
Async is already OK. Sync path is different from Async path.

Change-Id: I683d4b6b40f600793d2545811dcd6644515de79c
Task-number:QTBUG-43030
Reviewed-by: Jeongmin Kim <jm86.kim@lge.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Jeongmin Kim 2014-12-02 12:53:19 +09:00
parent c609a83426
commit 165b1c7da1

View File

@ -548,6 +548,8 @@ void QHttpThreadDelegate::synchronousFinishedWithErrorSlot(QNetworkReply::Networ
incomingErrorCode = errorCode;
incomingErrorDetail = detail;
synchronousDownloadData = httpReply->readAll();
QMetaObject::invokeMethod(httpReply, "deleteLater", Qt::QueuedConnection);
QMetaObject::invokeMethod(synchronousRequestLoop, "quit", Qt::QueuedConnection);
httpReply = 0;