Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #41335 from elpaso/bugfix-gh41292-server-cascading…
…-namespace-double-colon
Replace colon in typenames
- Loading branch information
|
@@ -201,7 +201,7 @@ namespace QgsWfs |
|
|
getFeatureQuery &query = *qIt; |
|
|
QString typeName = query.typeName; |
|
|
|
|
|
if ( !mapLayerMap.keys().contains( typeName ) ) |
|
|
if ( !mapLayerMap.contains( typeName ) ) |
|
|
{ |
|
|
throw QgsRequestNotWellFormedException( QStringLiteral( "TypeName '%1' unknown" ).arg( typeName ) ); |
|
|
} |
|
@@ -333,7 +333,7 @@ namespace QgsWfs |
|
|
accessControl->filterFeatures( vlayer, featureRequest ); |
|
|
|
|
|
QStringList attributes = QStringList(); |
|
|
for ( int idx : attrIndexes ) |
|
|
for ( int idx : qgis::as_const( attrIndexes ) ) |
|
|
{ |
|
|
attributes.append( vlayer->fields().field( idx ).name() ); |
|
|
} |
|
|
|
@@ -56,7 +56,8 @@ namespace QgsWfs |
|
|
href = request.originalUrl(); |
|
|
QUrlQuery q( href ); |
|
|
|
|
|
for ( auto param : q.queryItems() ) |
|
|
const auto constQueryItems = q.queryItems(); |
|
|
for ( const auto ¶m : constQueryItems ) |
|
|
{ |
|
|
if ( sFilter.contains( param.first.toUpper() ) ) |
|
|
q.removeAllQueryItems( param.first ); |
|
@@ -73,14 +74,14 @@ namespace QgsWfs |
|
|
QString name = layer->name(); |
|
|
if ( !layer->shortName().isEmpty() ) |
|
|
name = layer->shortName(); |
|
|
name = name.replace( ' ', '_' ); |
|
|
name = name.replace( ' ', '_' ).replace( ':', '-' ); |
|
|
return name; |
|
|
} |
|
|
|
|
|
QgsVectorLayer *layerByTypeName( const QgsProject *project, const QString &typeName ) |
|
|
{ |
|
|
QStringList layerIds = QgsServerProjectUtils::wfsLayerIds( *project ); |
|
|
for ( const QString &layerId : layerIds ) |
|
|
for ( const QString &layerId : qgis::as_const( layerIds ) ) |
|
|
{ |
|
|
QgsMapLayer *layer = project->mapLayer( layerId ); |
|
|
if ( !layer ) |
|
|