Skip to content

Commit c4afd27

Browse files
andreassteffensnyalldawson
authored andcommittedApr 21, 2023
[fix] fixed losing WFS Get/Post DCP endpoints upon cloning WFS datasource URI
1 parent 4c6bc51 commit c4afd27

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed
 

‎src/providers/wfs/qgswfsdatasourceuri.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,17 @@ void QgsWFSDataSourceURI::setGetEndpoints( const QgsStringMap &map )
469469
mGetEndpoints = map;
470470
}
471471

472+
QgsStringMap QgsWFSDataSourceURI::getGetEndpoints() const
473+
{
474+
return mGetEndpoints;
475+
}
476+
472477
void QgsWFSDataSourceURI::setPostEndpoints( const QgsStringMap &map )
473478
{
474479
mPostEndpoints = map;
475480
}
481+
482+
QgsStringMap QgsWFSDataSourceURI::getPostEndpoints() const
483+
{
484+
return mPostEndpoints;
485+
}

‎src/providers/wfs/qgswfsdatasourceuri.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,15 @@ class QgsWFSDataSourceURI
140140
//! Sets Get DCP endpoints
141141
void setGetEndpoints( const QgsStringMap &map );
142142

143+
//! Return Get DCP endpoints
144+
QgsStringMap getGetEndpoints() const;
145+
143146
//! Sets Post DCP endpoints
144147
void setPostEndpoints( const QgsStringMap &map );
145148

149+
//! Return Post DCP endpoints
150+
QgsStringMap getPostEndpoints() const;
151+
146152
//! Return set of unknown parameter keys in the URI.
147153
QSet<QString> unknownParamKeys() const;
148154

‎src/providers/wfs/qgswfsshareddata.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ bool QgsWFSSharedData::isRestrictedToRequestBBOX() const
4949
QgsWFSSharedData *QgsWFSSharedData::clone() const
5050
{
5151
QgsWFSSharedData *copy = new QgsWFSSharedData( mURI.uri( true ) );
52+
copy->mURI.setGetEndpoints(mURI.getGetEndpoints());
53+
copy->mURI.setPostEndpoints(mURI.getPostEndpoints());
5254
copy->mWFSVersion = mWFSVersion;
5355
copy->mGeometryAttribute = mGeometryAttribute;
5456
copy->mLayerPropertiesList = mLayerPropertiesList;

0 commit comments

Comments
 (0)
Please sign in to comment.