diff options
Diffstat (limited to 'src/core/url_request_custom_job_delegate.cpp')
-rw-r--r-- | src/core/url_request_custom_job_delegate.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/url_request_custom_job_delegate.cpp b/src/core/url_request_custom_job_delegate.cpp index 14de9a812..6b82cebb5 100644 --- a/src/core/url_request_custom_job_delegate.cpp +++ b/src/core/url_request_custom_job_delegate.cpp @@ -73,16 +73,23 @@ QByteArray URLRequestCustomJobDelegate::method() const void URLRequestCustomJobDelegate::reply(const QByteArray &contentType, QIODevice *device) { + if (device) + QObject::connect(device, &QIODevice::readyRead, this, &URLRequestCustomJobDelegate::slotReadyRead); content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJobProxy::reply, m_proxy,contentType.toStdString(),device)); } +void URLRequestCustomJobDelegate::slotReadyRead() +{ + content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, + base::Bind(&URLRequestCustomJobProxy::readyRead, m_proxy)); +} + void URLRequestCustomJobDelegate::abort() { content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, - base::Bind(&URLRequestCustomJobProxy::abort, - m_proxy)); + base::Bind(&URLRequestCustomJobProxy::abort, m_proxy)); } void URLRequestCustomJobDelegate::redirect(const QUrl &url) |