Skip to content

Commit

Permalink
[WFS provider] Transmit error message of feature downloader to provider
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault authored and nyalldawson committed May 21, 2021
1 parent b5c5cc7 commit bc3ba06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/providers/wfs/qgsbackgroundcachedfeatureiterator.cpp
Expand Up @@ -177,6 +177,8 @@ void QgsFeatureDownloaderImpl::endOfRun( bool serializeFeatures,

if ( serializeFeatures )
mSharedBase->endOfDownload( success, totalDownloadedFeatureCount, truncatedResponse, interrupted, errorMessage );
else if ( !errorMessage.isEmpty() )
mSharedBase->pushError( errorMessage );

// We must emit the signal *AFTER* the previous call to mShared->endOfDownload()
// to avoid issues with iterators that would start just now, wouldn't detect
Expand Down
6 changes: 3 additions & 3 deletions src/providers/wfs/qgsbackgroundcachedshareddata.h
Expand Up @@ -179,6 +179,9 @@ class QgsBackgroundCachedSharedData
//! Return layer name
virtual QString layerName() const = 0;

//! Called when an error must be raised to the provider
virtual void pushError( const QString &errorMsg ) = 0;

protected:

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

///////////////// PURE VIRTUAL METHODS ////////////////////////

//! Called when an error must be raised to the provider
virtual void pushError( const QString &errorMsg ) = 0;

//! Called when the extent is updated
virtual void emitExtentUpdated() = 0;

Expand Down

0 comments on commit bc3ba06

Please sign in to comment.