File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -1732,26 +1732,21 @@ namespace QgsWms
1732
1732
keywordsElem.appendChild ( keywordElem );
1733
1733
parent.appendChild ( keywordsElem );
1734
1734
QStringList keywords = QgsServerProjectUtils::owsServiceKeywords ( *project );
1735
- if ( !keywords. isEmpty ( ) )
1735
+ for ( const QString &keyword : qgis::as_const ( keywords ) )
1736
1736
{
1737
- for ( int i = 0 ; i < keywords. size (); ++i )
1737
+ if ( !keyword. isEmpty () )
1738
1738
{
1739
- QString keyword = keywords.at ( i );
1740
- if ( !keyword.isEmpty () )
1739
+ keywordElem = doc.createElement ( QStringLiteral ( " Keyword" ) );
1740
+ keywordText = doc.createTextNode ( keyword );
1741
+ keywordElem.appendChild ( keywordText );
1742
+ if ( sia2045 )
1741
1743
{
1742
- keywordElem = doc.createElement ( QStringLiteral ( " Keyword" ) );
1743
- keywordText = doc.createTextNode ( keyword );
1744
- keywordElem.appendChild ( keywordText );
1745
- if ( sia2045 )
1746
- {
1747
- keywordElem.setAttribute ( QStringLiteral ( " vocabulary" ), QStringLiteral ( " SIA_Geo405" ) );
1748
- }
1749
- keywordsElem.appendChild ( keywordElem );
1744
+ keywordElem.setAttribute ( QStringLiteral ( " vocabulary" ), QStringLiteral ( " SIA_Geo405" ) );
1750
1745
}
1746
+ keywordsElem.appendChild ( keywordElem );
1751
1747
}
1752
-
1753
- parent.appendChild ( keywordsElem );
1754
1748
}
1749
+ parent.appendChild ( keywordsElem );
1755
1750
}
1756
1751
}
1757
1752
You can’t perform that action at this time.
0 commit comments