Skip to content
Permalink
Browse files

Addressing code review comments

  • Loading branch information
pathmapper authored and nyalldawson committed Jan 4, 2021
1 parent fb5cf0c commit d9c220882ba9114522fef364ab369c4c3ed56503
@@ -36,7 +36,7 @@ Returns the owsService title defined in project.

:param project: the QGIS project

:return: the owsService title if defined in project with project title as fallback, "untitled" otherwise.
:return: the owsService title if defined in project with project title as fallback, "Untitled" otherwise.
%End

QString owsServiceAbstract( const QgsProject &project );
@@ -37,22 +37,14 @@ bool QgsServerProjectUtils::owsServiceCapabilities( const QgsProject &project )

QString QgsServerProjectUtils::owsServiceTitle( const QgsProject &project )
{
QString title;
QString serviceTitle = project.readEntry( QStringLiteral( "WMSServiceTitle" ), QStringLiteral( "/" ) );
if ( !serviceTitle.isEmpty() )
QString title = project.readEntry( QStringLiteral( "WMSServiceTitle" ), QStringLiteral( "/" ) );
if ( title.isEmpty() )
{
title = serviceTitle;
title = project.title();
}
else
if ( title.isEmpty() )
{
if ( !project.title().isEmpty() )
{
title = project.title();
}
else
{
title = QStringLiteral( "untitled" );
}
title = QObject::tr( "Untitled" );
}
return title;
}
@@ -68,7 +68,7 @@ namespace QgsServerProjectUtils
/**
* Returns the owsService title defined in project.
* \param project the QGIS project
* \returns the owsService title if defined in project with project title as fallback, "untitled" otherwise.
* \returns the owsService title if defined in project with project title as fallback, "Untitled" otherwise.
*/
SERVER_EXPORT QString owsServiceTitle( const QgsProject &project );

@@ -5,7 +5,7 @@ Content-Type: text/xml; charset=utf-8
<WMS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:qgs="http://www.qgis.org/wms" xmlns="http://www.opengis.net/wms" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://www.qgis.org/wms https://www.qgis.org/?SERVICE=WMS&amp;REQUEST=GetSchemaExtension" version="1.3.0" xmlns:sld="http://www.opengis.net/sld">
<Service>
<Name>WMS</Name>
<Title>untitled</Title>
<Title>Untitled</Title>
<KeywordList>
<Keyword vocabulary="ISO">infoMapAccessService</Keyword>
</KeywordList>
@@ -94,7 +94,7 @@ Content-Type: text/xml; charset=utf-8
</Exception>
<sld:UserDefinedSymbolization SupportSLD="1" RemoteWCS="0" UserLayer="0" InlineFeature="0" RemoteWFS="0" UserStyle="1"/>
<Layer queryable="1">
<Title>untitled</Title>
<Title>Untitled</Title>
<KeywordList>
<Keyword vocabulary="ISO">infoMapAccessService</Keyword>
</KeywordList>
@@ -5,7 +5,7 @@ Content-Type: text/xml; charset=utf-8
<WMS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:qgs="http://www.qgis.org/wms" xmlns="http://www.opengis.net/wms" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://www.qgis.org/wms https://www.qgis.org/?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_empty_spatial_layer.qgz&amp;SERVICE=WMS&amp;REQUEST=GetSchemaExtension" version="1.3.0" xmlns:sld="http://www.opengis.net/sld">
<Service>
<Name>WMS</Name>
<Title>untitled</Title>
<Title>Untitled</Title>
<KeywordList>
<Keyword vocabulary="ISO">infoMapAccessService</Keyword>
</KeywordList>
@@ -94,7 +94,7 @@ Content-Type: text/xml; charset=utf-8
</Exception>
<sld:UserDefinedSymbolization SupportSLD="1" RemoteWCS="0" UserLayer="0" InlineFeature="0" RemoteWFS="0" UserStyle="1"/>
<Layer queryable="1">
<Title>untitled</Title>
<Title>Untitled</Title>
<KeywordList>
<Keyword vocabulary="ISO">infoMapAccessService</Keyword>
</KeywordList>
@@ -5,7 +5,7 @@ Content-Type: text/xml; charset=utf-8
<WMS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:qgs="http://www.qgis.org/wms" xmlns="http://www.opengis.net/wms" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/sld_capabilities.xsd http://www.qgis.org/wms https://www.qgis.org/?MAP=/home/dhont/3liz_dev/QGIS/qgis_rldhont/tests/testdata/qgis_server/test_project_without_title.qgs&amp;SERVICE=WMS&amp;REQUEST=GetSchemaExtension" version="1.3.0" xmlns:sld="http://www.opengis.net/sld">
<Service>
<Name>WMS</Name>
<Title>untitled</Title>
<Title>Untitled</Title>
<KeywordList>
<Keyword vocabulary="ISO">infoMapAccessService</Keyword>
</KeywordList>
@@ -96,7 +96,7 @@ Content-Type: text/xml; charset=utf-8
</Exception>
<sld:UserDefinedSymbolization SupportSLD="1" RemoteWCS="0" UserLayer="0" InlineFeature="0" RemoteWFS="0" UserStyle="1"/>
<Layer queryable="1">
<Title>untitled</Title>
<Title>Untitled</Title>
<KeywordList>
<Keyword vocabulary="ISO">infoMapAccessService</Keyword>
</KeywordList>

0 comments on commit d9c2208

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