Skip to content

Commit

Permalink
Update for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Nov 16, 2017
1 parent 0a38003 commit 7b49032
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions src/server/services/wms/qgswmsgetcapabilities.cpp
Expand Up @@ -1732,26 +1732,21 @@ namespace QgsWms
keywordsElem.appendChild( keywordElem );
parent.appendChild( keywordsElem );
QStringList keywords = QgsServerProjectUtils::owsServiceKeywords( *project );
if ( !keywords.isEmpty() )
for ( const QString &keyword : qgis::as_const( keywords ) )
{
for ( int i = 0; i < keywords.size(); ++i )
if ( !keyword.isEmpty() )
{
QString keyword = keywords.at( i );
if ( !keyword.isEmpty() )
keywordElem = doc.createElement( QStringLiteral( "Keyword" ) );
keywordText = doc.createTextNode( keyword );
keywordElem.appendChild( keywordText );
if ( sia2045 )
{
keywordElem = doc.createElement( QStringLiteral( "Keyword" ) );
keywordText = doc.createTextNode( keyword );
keywordElem.appendChild( keywordText );
if ( sia2045 )
{
keywordElem.setAttribute( QStringLiteral( "vocabulary" ), QStringLiteral( "SIA_Geo405" ) );
}
keywordsElem.appendChild( keywordElem );
keywordElem.setAttribute( QStringLiteral( "vocabulary" ), QStringLiteral( "SIA_Geo405" ) );
}
keywordsElem.appendChild( keywordElem );
}

parent.appendChild( keywordsElem );
}
parent.appendChild( keywordsElem );
}
}

Expand Down

0 comments on commit 7b49032

Please sign in to comment.