Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
return the evaluated text of expression in wmsOnlineResource if avail…
…able
  • Loading branch information
signedav committed May 13, 2020
1 parent 0e4b6b8 commit 062bd50
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/server/qgsserverprojectutils.cpp
Expand Up @@ -65,7 +65,16 @@ QStringList QgsServerProjectUtils::owsServiceKeywords( const QgsProject &project

QString QgsServerProjectUtils::owsServiceOnlineResource( const QgsProject &project )
{
return project.readEntry( QStringLiteral( "WMSOnlineResource" ), QStringLiteral( "/" ) );
QString wmsOnlineResource = project.readEntry( QStringLiteral( "WMSOnlineResource" ), QStringLiteral( "/" ) );

QgsProperty wmsOnlineResourceExpression = project.readPropertyEntry( QStringLiteral( "WMSOnlineResource" ), QStringLiteral( "/" ) );
if ( wmsOnlineResourceExpression.isActive() && ! wmsOnlineResourceExpression.expressionString().isEmpty() )
{
QgsExpressionContext context;
return wmsOnlineResourceExpression.valueAsString( context, wmsOnlineResource );
}

return wmsOnlineResource;
}

QString QgsServerProjectUtils::owsServiceContactOrganization( const QgsProject &project )
Expand Down

0 comments on commit 062bd50

Please sign in to comment.