Skip to content

Commit bc3ba06

Browse files
rouaultnyalldawson
authored andcommittedMay 21, 2021
[WFS provider] Transmit error message of feature downloader to provider
1 parent b5c5cc7 commit bc3ba06

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎src/providers/wfs/qgsbackgroundcachedfeatureiterator.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ void QgsFeatureDownloaderImpl::endOfRun( bool serializeFeatures,
177177

178178
if ( serializeFeatures )
179179
mSharedBase->endOfDownload( success, totalDownloadedFeatureCount, truncatedResponse, interrupted, errorMessage );
180+
else if ( !errorMessage.isEmpty() )
181+
mSharedBase->pushError( errorMessage );
180182

181183
// We must emit the signal *AFTER* the previous call to mShared->endOfDownload()
182184
// to avoid issues with iterators that would start just now, wouldn't detect

‎src/providers/wfs/qgsbackgroundcachedshareddata.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ class QgsBackgroundCachedSharedData
179179
//! Return layer name
180180
virtual QString layerName() const = 0;
181181

182+
//! Called when an error must be raised to the provider
183+
virtual void pushError( const QString &errorMsg ) = 0;
184+
182185
protected:
183186

184187
//////////// Input members. Implementations should define them to meaningful values
@@ -318,9 +321,6 @@ class QgsBackgroundCachedSharedData
318321

319322
///////////////// PURE VIRTUAL METHODS ////////////////////////
320323

321-
//! Called when an error must be raised to the provider
322-
virtual void pushError( const QString &errorMsg ) = 0;
323-
324324
//! Called when the extent is updated
325325
virtual void emitExtentUpdated() = 0;
326326

0 commit comments

Comments
 (0)
Please sign in to comment.