@@ -147,10 +147,10 @@ namespace QgsWmts
147
147
if ( !keywords.isEmpty () )
148
148
{
149
149
QDomElement keywordsElem = doc.createElement ( QStringLiteral ( " ows:Keywords" ) );
150
- for ( int i = 0 ; i < keywords. size (); ++i )
150
+ for ( const QString k : keywords )
151
151
{
152
152
QDomElement keywordElem = doc.createElement ( QStringLiteral ( " ows:Keyword" ) );
153
- QDomText keywordText = doc.createTextNode ( keywords. at ( i ) );
153
+ QDomText keywordText = doc.createTextNode ( k );
154
154
keywordElem.appendChild ( keywordText );
155
155
keywordsElem.appendChild ( keywordElem );
156
156
}
@@ -389,7 +389,7 @@ namespace QgsWmts
389
389
QStringList wmtsPngGroupNameList = project->readListEntry ( QStringLiteral ( " WMTSPngLayers" ), QStringLiteral ( " Group" ) );
390
390
QStringList wmtsJpegGroupNameList = project->readListEntry ( QStringLiteral ( " WMTSJpegLayers" ), QStringLiteral ( " Group" ) );
391
391
392
- for ( QString gName : wmtsGroupNameList )
392
+ for ( const QString gName : wmtsGroupNameList )
393
393
{
394
394
QgsLayerTreeGroup *treeGroup = treeRoot->findGroup ( gName );
395
395
if ( !treeGroup )
@@ -450,7 +450,7 @@ namespace QgsWmts
450
450
QStringList wmtsPngLayerIdList = project->readListEntry ( QStringLiteral ( " WMTSPngLayers" ), QStringLiteral ( " Layer" ) );
451
451
QStringList wmtsJpegLayerIdList = project->readListEntry ( QStringLiteral ( " WMTSJpegLayers" ), QStringLiteral ( " Layer" ) );
452
452
453
- for ( QString lId : wmtsLayerIdList )
453
+ for ( const QString lId : wmtsLayerIdList )
454
454
{
455
455
QgsMapLayer *l = project->mapLayer ( lId );
456
456
if ( !l )
@@ -511,7 +511,7 @@ namespace QgsWmts
511
511
elem.appendChild ( formatElem );
512
512
};
513
513
514
- for ( layerDef wmtsLayer : wmtsLayers )
514
+ for ( const layerDef wmtsLayer : wmtsLayers )
515
515
{
516
516
if ( wmtsLayer.id .isEmpty () )
517
517
continue ;
@@ -554,7 +554,7 @@ namespace QgsWmts
554
554
layerElem.appendChild ( wgs84BBoxElement );
555
555
556
556
// Other bounding boxes
557
- for ( tileMatrixSetDef tms : tmsList )
557
+ for ( const tileMatrixSetDef tms : tmsList )
558
558
{
559
559
if ( tms.ref == QLatin1String ( " EPSG:4326" ) )
560
560
continue ;
@@ -597,7 +597,7 @@ namespace QgsWmts
597
597
layerStyleElem.appendChild ( layerStyleTitleElem );
598
598
layerElem.appendChild ( layerStyleElem );
599
599
600
- for ( QString format : wmtsLayer.formats )
600
+ for ( const QString format : wmtsLayer.formats )
601
601
{
602
602
QDomElement layerFormatElem = doc.createElement ( QStringLiteral ( " Format" ) );
603
603
QDomText layerFormatText = doc.createTextNode ( format );
@@ -614,7 +614,7 @@ namespace QgsWmts
614
614
appendInfoFormat ( layerElem, QStringLiteral ( " application/vnd.ogc.gml/3.1.1" ) );
615
615
}
616
616
617
- for ( tileMatrixSetDef tms : tmsList )
617
+ for ( const tileMatrixSetDef tms : tmsList )
618
618
{
619
619
if ( tms.ref != QLatin1String ( " EPSG:4326" ) )
620
620
{
@@ -642,7 +642,7 @@ namespace QgsWmts
642
642
// wmts:TileMatrixSetLimits
643
643
QDomElement tmsLimitsElement = doc.createElement ( QStringLiteral ( " TileMatrixSetLimits" )/* wmts:TileMatrixSetLimits*/ );
644
644
int tmIdx = 0 ;
645
- for ( tileMatrixDef tm : tms.tileMatrixList )
645
+ for ( const tileMatrixDef tm : tms.tileMatrixList )
646
646
{
647
647
QDomElement tmLimitsElement = doc.createElement ( QStringLiteral ( " TileMatrixLimits" )/* wmts:TileMatrixLimits*/ );
648
648
@@ -687,7 +687,7 @@ namespace QgsWmts
687
687
void appendTileMatrixSetElements ( QDomDocument &doc, QDomElement &contentsElement,
688
688
QList< tileMatrixSetDef > tmsList )
689
689
{
690
- for ( tileMatrixSetDef tms : tmsList )
690
+ for ( const tileMatrixSetDef tms : tmsList )
691
691
{
692
692
// wmts:TileMatrixSet
693
693
QDomElement tmsElement = doc.createElement ( QStringLiteral ( " TileMatrixSet" )/* wmts:TileMatrixSet*/ );
@@ -704,7 +704,7 @@ namespace QgsWmts
704
704
705
705
// wmts:TileMatrix
706
706
int tmIdx = 0 ;
707
- for ( tileMatrixDef tm : tms.tileMatrixList )
707
+ for ( const tileMatrixDef tm : tms.tileMatrixList )
708
708
{
709
709
QDomElement tmElement = doc.createElement ( QStringLiteral ( " TileMatrix" )/* wmts:TileMatrix*/ );
710
710
0 commit comments