Skip to content

Commit 8e67b26

Browse files
committedApr 11, 2019
Update enum
1 parent 3ec23ca commit 8e67b26

File tree

9 files changed

+71
-81
lines changed

9 files changed

+71
-81
lines changed
 

‎src/server/services/wms/qgswms.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace QgsWms
9090
const QString req = parameters.request();
9191
if ( req.isEmpty() )
9292
{
93-
throw QgsServiceException( QgsServiceException::OGC_OPERATION_NOT_SUPPORTED,
93+
throw QgsServiceException( QgsServiceException::OGC_OperationNotSupported,
9494
QStringLiteral( "Please check the value of the REQUEST parameter" ), 501 );
9595
}
9696

@@ -153,7 +153,7 @@ namespace QgsWms
153153
else
154154
{
155155
// Operation not supported
156-
throw QgsServiceException( QgsServiceException::OGC_OPERATION_NOT_SUPPORTED,
156+
throw QgsServiceException( QgsServiceException::OGC_OperationNotSupported,
157157
QString( "Request %1 is not supported" ).arg( req ), 501 );
158158
}
159159
}

‎src/server/services/wms/qgswmsgetlegendgraphics.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,25 +131,25 @@ namespace QgsWms
131131
{
132132
if ( parameters.allLayersNickname().isEmpty() )
133133
{
134-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE,
134+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
135135
parameters[QgsWmsParameter::LAYERS] );
136136
}
137137

138138
if ( parameters.format() == QgsWmsParameters::Format::NONE )
139139
{
140-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE,
140+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
141141
parameters[QgsWmsParameter::FORMAT] );
142142
}
143143

144144
if ( ! parameters.bbox().isEmpty() && !parameters.rule().isEmpty() )
145145
{
146-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
146+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
147147
QStringLiteral( "BBOX parameter cannot be combined with RULE." ) );
148148
}
149149

150150
if ( ! parameters.bbox().isEmpty() && parameters.bboxAsRectangle().isEmpty() )
151151
{
152-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
152+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
153153
parameters[QgsWmsParameter::BBOX] );
154154
}
155155
}

‎src/server/services/wms/qgswmsgetprint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace QgsWms
5050
contentType = QStringLiteral( "application/pdf" );
5151
break;
5252
default:
53-
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_FORMAT,
53+
throw QgsBadRequestException( QgsServiceException::OGC_InvalidFormat,
5454
parameters[QgsWmsParameter::FORMAT] );
5555
break;
5656
}

‎src/server/services/wms/qgswmsgetstyles.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ namespace QgsWms
5959

6060
if ( layersName.isEmpty() )
6161
{
62-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE,
62+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
6363
QgsWmsParameter::LAYERS );
6464
}
6565

6666
QStringList layerList = layersName.split( ',', QString::SkipEmptyParts );
6767
if ( layerList.isEmpty() )
6868
{
69-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE,
69+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
7070
QgsWmsParameter::LAYERS );
7171
}
7272

@@ -96,13 +96,13 @@ namespace QgsWms
9696

9797
if ( styleName.isEmpty() )
9898
{
99-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE,
99+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
100100
QgsWmsParameter::STYLE );
101101
}
102102

103103
if ( layerName.isEmpty() )
104104
{
105-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE,
105+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
106106
QgsWmsParameter::LAYERS );
107107
}
108108

‎src/server/services/wms/qgswmsparameters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1836,7 +1836,7 @@ namespace QgsWms
18361836

18371837
void QgsWmsParameters::raiseError( const QString &msg ) const
18381838
{
1839-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE, msg );
1839+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue, msg );
18401840
}
18411841

18421842
QgsWmsParameter QgsWmsParameters::idParameter( const QgsWmsParameter::Name name, const int id ) const

‎src/server/services/wms/qgswmsrendercontext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ void QgsWmsRenderContext::searchLayersToRenderSld()
436436
{
437437
QgsWmsParameter param( QgsWmsParameter::LAYER );
438438
param.mValue = lname;
439-
throw QgsBadRequestException( QgsServiceException::OGC_LAYER_NOT_DEFINED,
439+
throw QgsBadRequestException( QgsServiceException::OGC_LayerNotDefined,
440440
param );
441441
}
442442
}
@@ -482,7 +482,7 @@ void QgsWmsRenderContext::searchLayersToRenderStyle()
482482
{
483483
QgsWmsParameter param( QgsWmsParameter::LAYER );
484484
param.mValue = nickname;
485-
throw QgsBadRequestException( QgsServiceException::OGC_LAYER_NOT_DEFINED,
485+
throw QgsBadRequestException( QgsServiceException::OGC_LayerNotDefined,
486486
param );
487487
}
488488
}

‎src/server/services/wms/qgswmsrenderer.cpp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ namespace QgsWms
284284
const QString templateName = mWmsParameters.composerTemplate();
285285
if ( templateName.isEmpty() )
286286
{
287-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE,
287+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
288288
QgsWmsParameter::TEMPLATE );
289289
}
290290

@@ -293,14 +293,14 @@ namespace QgsWms
293293
QgsPrintLayout *sourceLayout( dynamic_cast<QgsPrintLayout *>( lManager->layoutByName( templateName ) ) );
294294
if ( !sourceLayout )
295295
{
296-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
296+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
297297
mWmsParameters[QgsWmsParameter::TEMPLATE ] );
298298
}
299299

300300
// Check that layout has at least one page
301301
if ( sourceLayout->pageCollection()->pageCount() < 1 )
302302
{
303-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
303+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
304304
QStringLiteral( "The template has no pages" ) );
305305
}
306306

@@ -315,14 +315,14 @@ namespace QgsWms
315315
if ( !atlas || !atlas->enabled() )
316316
{
317317
//error
318-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
318+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
319319
QStringLiteral( "The template has no atlas enabled" ) );
320320
}
321321

322322
QgsVectorLayer *cLayer = atlas->coverageLayer();
323323
if ( !cLayer )
324324
{
325-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
325+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
326326
QStringLiteral( "The atlas has no coverage layer" ) );
327327
}
328328

@@ -333,7 +333,7 @@ namespace QgsWms
333333
atlas->updateFeatures();
334334
if ( atlas->count() > maxAtlasFeatures )
335335
{
336-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
336+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
337337
QString( "The project configuration allows printing maximum %1 atlas features at a time" ).arg( maxAtlasFeatures ) );
338338
}
339339
}
@@ -353,14 +353,14 @@ namespace QgsWms
353353
int nAtlasFeatures = atlasPk.size() / pkIndexes.size();
354354
if ( nAtlasFeatures * pkIndexes.size() != atlasPk.size() ) //Test is atlasPk.size() is a multiple of pkIndexes.size(). Bail out if not
355355
{
356-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
356+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
357357
QStringLiteral( "Wrong number of ATLAS_PK parameters" ) );
358358
}
359359

360360
//number of atlas features might be restricted
361361
if ( nAtlasFeatures > maxAtlasFeatures )
362362
{
363-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
363+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
364364
QString( "%1 atlas features have been requestet, but the project configuration only allows printing %2 atlas features at a time" )
365365
.arg( nAtlasFeatures ).arg( maxAtlasFeatures ) );
366366
}
@@ -526,7 +526,7 @@ namespace QgsWms
526526
}
527527
else //unknown format
528528
{
529-
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_FORMAT,
529+
throw QgsBadRequestException( QgsServiceException::OGC_InvalidFormat,
530530
mWmsParameters[QgsWmsParameter::FORMAT] );
531531
}
532532

@@ -846,15 +846,15 @@ namespace QgsWms
846846
{
847847
QgsWmsParameter param( QgsWmsParameter::I );
848848
param.mValue = i;
849-
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_POINT,
849+
throw QgsBadRequestException( QgsServiceException::OGC_InvalidPoint,
850850
param );
851851
}
852852

853853
if ( j < 0 || j > mapSettings.outputSize().height() )
854854
{
855855
QgsWmsParameter param( QgsWmsParameter::J );
856856
param.mValue = j;
857-
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_POINT,
857+
throw QgsBadRequestException( QgsServiceException::OGC_InvalidPoint,
858858
param );
859859
}
860860

@@ -870,7 +870,7 @@ namespace QgsWms
870870
// The QUERY_LAYERS parameter is Mandatory
871871
if ( mWmsParameters.queryLayersNickname().isEmpty() )
872872
{
873-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE,
873+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue,
874874
mWmsParameters[QgsWmsParameter::QUERY_LAYERS] );
875875
}
876876

@@ -887,13 +887,13 @@ namespace QgsWms
887887
if ( mWmsParameters.j().isEmpty() )
888888
parameter = mWmsParameters[QgsWmsParameter::J];
889889

890-
throw QgsBadRequestException( QgsServiceException::QGIS_MISSING_PARAMETER_VALUE, parameter );
890+
throw QgsBadRequestException( QgsServiceException::QGIS_MissingParameterValue, parameter );
891891
}
892892

893893
const QgsWmsParameters::Format infoFormat = mWmsParameters.infoFormat();
894894
if ( infoFormat == QgsWmsParameters::Format::NONE )
895895
{
896-
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_FORMAT,
896+
throw QgsBadRequestException( QgsServiceException::OGC_InvalidFormat,
897897
mWmsParameters[QgsWmsParameter::INFO_FORMAT] );
898898
}
899899

@@ -970,7 +970,7 @@ namespace QgsWms
970970
QgsRectangle mapExtent = mWmsParameters.bboxAsRectangle();
971971
if ( !mWmsParameters.bbox().isEmpty() && mapExtent.isEmpty() )
972972
{
973-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
973+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
974974
mWmsParameters[QgsWmsParameter::BBOX] );
975975
}
976976

@@ -1001,12 +1001,12 @@ namespace QgsWms
10011001

10021002
if ( width <= 0 )
10031003
{
1004-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
1004+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
10051005
mWmsParameters[QgsWmsParameter::WIDTH] );
10061006
}
10071007
else if ( height <= 0 )
10081008
{
1009-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
1009+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
10101010
mWmsParameters[QgsWmsParameter::HEIGHT] );
10111011
}
10121012

@@ -1054,7 +1054,7 @@ namespace QgsWms
10541054
QgsRectangle mapExtent = mWmsParameters.bboxAsRectangle();
10551055
if ( !mWmsParameters.bbox().isEmpty() && mapExtent.isEmpty() )
10561056
{
1057-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
1057+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
10581058
mWmsParameters[QgsWmsParameter::BBOX] );
10591059
}
10601060

@@ -1080,12 +1080,12 @@ namespace QgsWms
10801080

10811081
if ( mWmsParameters.versionAsNumber() >= QgsProjectVersion( 1, 3, 0 ) )
10821082
{
1083-
code = QgsServiceException::OGC_INVALID_CRS;
1083+
code = QgsServiceException::OGC_InvalidCRS;
10841084
parameter = mWmsParameters[ QgsWmsParameter::CRS ];
10851085
}
10861086
else
10871087
{
1088-
code = QgsServiceException::OGC_INVALID_SRS;
1088+
code = QgsServiceException::OGC_InvalidSRS;
10891089
parameter = mWmsParameters[ QgsWmsParameter::SRS ];
10901090
}
10911091

@@ -1322,7 +1322,7 @@ namespace QgsWms
13221322
{
13231323
QgsWmsParameter param( QgsWmsParameter::LAYER );
13241324
param.mValue = queryLayer;
1325-
throw QgsBadRequestException( QgsServiceException::OGC_LAYER_NOT_DEFINED,
1325+
throw QgsBadRequestException( QgsServiceException::OGC_LayerNotDefined,
13261326
param );
13271327
}
13281328
else if ( ( validLayer && !queryableLayer ) || ( !validLayer && mContext.isValidGroup( queryLayer ) ) )
@@ -1359,7 +1359,7 @@ namespace QgsWms
13591359
// Only throw if it's not a group or the group has no queryable children
13601360
if ( ! hasGroupAndQueryable )
13611361
{
1362-
throw QgsBadRequestException( QgsServiceException::OGC_LAYER_NOT_QUERYABLE,
1362+
throw QgsBadRequestException( QgsServiceException::OGC_LayerNotQueryable,
13631363
param );
13641364
}
13651365
}
@@ -1897,7 +1897,7 @@ namespace QgsWms
18971897
int width = this->width();
18981898
if ( wmsMaxWidth != -1 && width > wmsMaxWidth )
18991899
{
1900-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
1900+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
19011901
QStringLiteral( "The requested map width is too large" ) );
19021902
}
19031903

@@ -1919,7 +1919,7 @@ namespace QgsWms
19191919
int height = this->height();
19201920
if ( wmsMaxHeight != -1 && height > wmsMaxHeight )
19211921
{
1922-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
1922+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
19231923
QStringLiteral( "The requested map height is too large" ) );
19241924
}
19251925

@@ -1948,7 +1948,7 @@ namespace QgsWms
19481948
|| std::numeric_limits<int>::max() / static_cast<uint>( bytes_per_line ) < static_cast<uint>( height )
19491949
|| std::numeric_limits<int>::max() / sizeof( uchar * ) < static_cast<uint>( height ) )
19501950
{
1951-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
1951+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
19521952
QStringLiteral( "The requested map size is too large" ) );
19531953
}
19541954
}
@@ -2778,7 +2778,7 @@ namespace QgsWms
27782778
QString errorMsg;
27792779
if ( !filterXml.setContent( filter.mFilter, true, &errorMsg ) )
27802780
{
2781-
throw QgsBadRequestException( QgsServiceException::QGIS_INVALID_PARAMETER_VALUE,
2781+
throw QgsBadRequestException( QgsServiceException::QGIS_InvalidParameterValue,
27822782
QStringLiteral( "Filter string rejected. Error message: %1. The XML string was: %2" ).arg( errorMsg, filter.mFilter ) );
27832783
}
27842784
QDomElement filterElem = filterXml.firstChildElement();
@@ -2992,7 +2992,7 @@ namespace QgsWms
29922992
bool rc = layer->styleManager()->setCurrentStyle( style );
29932993
if ( ! rc )
29942994
{
2995-
throw QgsBadRequestException( QgsServiceException::OGC_STYLE_NOT_DEFINED,
2995+
throw QgsBadRequestException( QgsServiceException::OGC_StyleNotDefined,
29962996
QStringLiteral( "Style '%1' does not exist for layer '%2'" ).arg( style, layer->name() ) );
29972997
}
29982998
}

‎src/server/services/wms/qgswmsserviceexception.h

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ namespace QgsWms
4646
*/
4747
enum ExceptionCode
4848
{
49-
OGC_INVALID_FORMAT,
50-
OGC_INVALID_SRS,
51-
OGC_LAYER_NOT_DEFINED,
52-
OGC_STYLE_NOT_DEFINED,
53-
OGC_LAYER_NOT_QUERYABLE,
54-
OGC_CURRENT_UPDATE_SEQUENCE,
55-
OGC_INVALID_UPDATE_SEQUENCE,
56-
OGC_MISSING_DIMENSION_VALUE,
57-
OGC_INVALID_DIMENSION_VALUE,
58-
OGC_INVALID_POINT, // new in WMS 1.3.0
59-
OGC_INVALID_CRS, // new in WMS 1.3.0
60-
OGC_OPERATION_NOT_SUPPORTED, // new in WMS 1.3.0
61-
QGIS_MISSING_PARAMETER_VALUE,
62-
QGIS_INVALID_PARAMETER_VALUE
49+
OGC_InvalidFormat,
50+
OGC_InvalidSRS,
51+
OGC_LayerNotDefined,
52+
OGC_StyleNotDefined,
53+
OGC_LayerNotQueryable,
54+
OGC_CurrentUpdateSequence,
55+
OGC_InvalidUpdateSequence,
56+
OGC_MissingDimensionValue,
57+
OGC_InvalidDimensionValue,
58+
OGC_InvalidPoint, // new in WMS 1.3.0
59+
OGC_InvalidCRS, // new in WMS 1.3.0
60+
OGC_OperationNotSupported, // new in WMS 1.3.0
61+
QGIS_MissingParameterValue,
62+
QGIS_InvalidParameterValue
6363
};
6464
Q_ENUM( ExceptionCode )
6565

@@ -115,52 +115,52 @@ namespace QgsWms
115115

116116
switch ( code )
117117
{
118-
case QgsServiceException::QGIS_MISSING_PARAMETER_VALUE:
118+
case QgsServiceException::QGIS_MissingParameterValue:
119119
{
120120
message = QStringLiteral( "The %1 parameter is missing." ).arg( name );
121121
break;
122122
}
123-
case QGIS_INVALID_PARAMETER_VALUE:
123+
case QGIS_InvalidParameterValue:
124124
{
125125
message = QStringLiteral( "The %1 parameter is invalid." ).arg( name );
126126
break;
127127
}
128-
case OGC_INVALID_FORMAT:
128+
case OGC_InvalidFormat:
129129
{
130130
message = QStringLiteral( "The format '%1' from %2 is not supported." ).arg( parameter.toString(), name );
131131
break;
132132
}
133-
case OGC_INVALID_SRS:
133+
case OGC_InvalidSRS:
134134
{
135135
message = QStringLiteral( "The SRS is not valid." );
136136
break;
137137
}
138-
case OGC_INVALID_CRS:
138+
case OGC_InvalidCRS:
139139
{
140140
message = QStringLiteral( "The CRS is not valid." );
141141
break;
142142
}
143-
case OGC_LAYER_NOT_DEFINED:
143+
case OGC_LayerNotDefined:
144144
{
145145
message = QStringLiteral( "The layer '%1' does not exist." ).arg( parameter.toString() );
146146
break;
147147
}
148-
case OGC_LAYER_NOT_QUERYABLE:
148+
case OGC_LayerNotQueryable:
149149
{
150150
message = QStringLiteral( "The layer '%1' is not queryable." ).arg( parameter.toString() );
151151
break;
152152
}
153-
case OGC_INVALID_POINT:
153+
case OGC_InvalidPoint:
154154
{
155155
message = QStringLiteral( "The point '%1' from '%2' is invalid." ).arg( parameter.toString(), name );
156156
break;
157157
}
158-
case OGC_STYLE_NOT_DEFINED:
159-
case OGC_CURRENT_UPDATE_SEQUENCE:
160-
case OGC_INVALID_UPDATE_SEQUENCE:
161-
case OGC_MISSING_DIMENSION_VALUE:
162-
case OGC_INVALID_DIMENSION_VALUE:
163-
case OGC_OPERATION_NOT_SUPPORTED:
158+
case OGC_StyleNotDefined:
159+
case OGC_CurrentUpdateSequence:
160+
case OGC_InvalidUpdateSequence:
161+
case OGC_MissingDimensionValue:
162+
case OGC_InvalidDimensionValue:
163+
case OGC_OperationNotSupported:
164164
{
165165
break;
166166
}
@@ -179,17 +179,7 @@ namespace QgsWms
179179
key.replace( QStringLiteral( "OGC_" ), QString() );
180180
key.replace( QStringLiteral( "QGIS_" ), QString() );
181181

182-
// build the exception name
183-
QString formattedCode;
184-
for ( auto &part : key.split( '_' ) )
185-
{
186-
part = part.toLower().replace( 0, 1, part[0].toUpper() );
187-
part.replace( QStringLiteral( "Srs" ), QStringLiteral( "SRS" ) );
188-
part.replace( QStringLiteral( "Crs" ), QStringLiteral( "CRS" ) );
189-
formattedCode = QString( "%1%2" ).arg( formattedCode ).arg( part );
190-
}
191-
192-
return formattedCode;
182+
return key;
193183
}
194184
};
195185

‎src/server/services/wms/qgswmsutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ namespace QgsWms
163163
{
164164
QgsWmsParameter parameter( QgsWmsParameter::FORMAT );
165165
parameter.mValue = formatStr;
166-
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_FORMAT,
166+
throw QgsBadRequestException( QgsServiceException::OGC_InvalidFormat,
167167
parameter );
168168
}
169169
}

0 commit comments

Comments
 (0)
Please sign in to comment.