Skip to content
Permalink
Browse files

return the evaluated text of expression in wmsOnlineResource if avail…

…able
  • Loading branch information
signedav committed May 13, 2020
1 parent 0e4b6b8 commit 062bd50b3934f86245743f5e4027219c902d25da
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/server/qgsserverprojectutils.cpp
@@ -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 )

0 comments on commit 062bd50

Please sign in to comment.
You can’t perform that action at this time.