Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add comment to explain the nasty details
- Loading branch information
Showing
with
3 additions
and
2 deletions.
-
+3
−2
src/providers/wfs/qgswfsrequest.cpp
|
@@ -133,8 +133,6 @@ bool QgsWfsRequest::sendGET( const QUrl &url, bool synchronous, bool forceRefres |
|
|
bool success = true; |
|
|
mReply = QgsNetworkAccessManager::instance()->get( request ); |
|
|
|
|
|
Q_ASSERT( QThread::currentThread() == mReply->thread() ); |
|
|
|
|
|
mReply->setReadBufferSize( READ_BUFFER_SIZE_HINT ); |
|
|
if ( !mUri.auth().setAuthorizationReply( mReply ) ) |
|
|
{ |
|
@@ -145,6 +143,9 @@ bool QgsWfsRequest::sendGET( const QUrl &url, bool synchronous, bool forceRefres |
|
|
} |
|
|
else |
|
|
{ |
|
|
// We are able to use direct connection here, because we |
|
|
// * either run on the thread mReply lives in, so DirectConnection is standard and safe anyway (if it is not the main thread) |
|
|
// * or the owner thread of mReply is currently not doing anything because it's blocked in future.waitForFinished() (if it is the main thread) |
|
|
connect( mReply, &QNetworkReply::finished, this, &QgsWfsRequest::replyFinished, Qt::DirectConnection ); |
|
|
connect( mReply, &QNetworkReply::downloadProgress, this, &QgsWfsRequest::replyProgress, Qt::DirectConnection ); |
|
|
|
|
|