Skip to content
Permalink
Browse files

Add comment to explain the nasty details

  • Loading branch information
m-kuhn committed May 23, 2018
1 parent 143ee82 commit bdcd87675e3c71fc1269f2b02644a9358237f20e
Showing with 3 additions and 2 deletions.
  1. +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 );

0 comments on commit bdcd876

Please sign in to comment.
You can’t perform that action at this time.