Skip to content

Commit

Permalink
[fix] fixed losing WFS Get/Post DCP endpoints upon cloning WFS dataso…
Browse files Browse the repository at this point in the history
…urce URI
  • Loading branch information
andreassteffens authored and nyalldawson committed Apr 21, 2023
1 parent 4c6bc51 commit c4afd27
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/providers/wfs/qgswfsdatasourceuri.cpp
Expand Up @@ -469,7 +469,17 @@ void QgsWFSDataSourceURI::setGetEndpoints( const QgsStringMap &map )
mGetEndpoints = map;
}

QgsStringMap QgsWFSDataSourceURI::getGetEndpoints() const
{
return mGetEndpoints;
}

void QgsWFSDataSourceURI::setPostEndpoints( const QgsStringMap &map )
{
mPostEndpoints = map;
}

QgsStringMap QgsWFSDataSourceURI::getPostEndpoints() const
{
return mPostEndpoints;
}
6 changes: 6 additions & 0 deletions src/providers/wfs/qgswfsdatasourceuri.h
Expand Up @@ -140,9 +140,15 @@ class QgsWFSDataSourceURI
//! Sets Get DCP endpoints
void setGetEndpoints( const QgsStringMap &map );

//! Return Get DCP endpoints
QgsStringMap getGetEndpoints() const;

//! Sets Post DCP endpoints
void setPostEndpoints( const QgsStringMap &map );

//! Return Post DCP endpoints
QgsStringMap getPostEndpoints() const;

//! Return set of unknown parameter keys in the URI.
QSet<QString> unknownParamKeys() const;

Expand Down
2 changes: 2 additions & 0 deletions src/providers/wfs/qgswfsshareddata.cpp
Expand Up @@ -49,6 +49,8 @@ bool QgsWFSSharedData::isRestrictedToRequestBBOX() const
QgsWFSSharedData *QgsWFSSharedData::clone() const
{
QgsWFSSharedData *copy = new QgsWFSSharedData( mURI.uri( true ) );
copy->mURI.setGetEndpoints(mURI.getGetEndpoints());
copy->mURI.setPostEndpoints(mURI.getPostEndpoints());
copy->mWFSVersion = mWFSVersion;
copy->mGeometryAttribute = mGeometryAttribute;
copy->mLayerPropertiesList = mLayerPropertiesList;
Expand Down

0 comments on commit c4afd27

Please sign in to comment.