Skip to content

Commit

Permalink
Replace getter names
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Feb 26, 2019
1 parent 5d59d66 commit d67875f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsgetlegendgraphics.cpp
Expand Up @@ -85,7 +85,7 @@ namespace QgsWms

if ( result )
{
writeImage( response, *result, format, renderer.getImageQuality() );
writeImage( response, *result, format, renderer.imageQuality() );
if ( cacheManager )
{
QByteArray content = response.data();
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsgetmap.cpp
Expand Up @@ -42,7 +42,7 @@ namespace QgsWms
if ( result )
{
QString format = params.value( QStringLiteral( "FORMAT" ), QStringLiteral( "PNG" ) );
writeImage( response, *result, format, renderer.getImageQuality() );
writeImage( response, *result, format, renderer.imageQuality() );
}
else
{
Expand Down
22 changes: 11 additions & 11 deletions src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -1753,10 +1753,10 @@ namespace QgsWms
{
QDomElement bBoxElem = infoDocument.createElement( QStringLiteral( "BoundingBox" ) );
bBoxElem.setAttribute( version == QLatin1String( "1.1.1" ) ? "SRS" : "CRS", outputCrs.authid() );
bBoxElem.setAttribute( QStringLiteral( "minx" ), qgsDoubleToString( box.xMinimum(), getWMSPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "maxx" ), qgsDoubleToString( box.xMaximum(), getWMSPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "miny" ), qgsDoubleToString( box.yMinimum(), getWMSPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "maxy" ), qgsDoubleToString( box.yMaximum(), getWMSPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "minx" ), qgsDoubleToString( box.xMinimum(), wmsPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "maxx" ), qgsDoubleToString( box.xMaximum(), wmsPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "miny" ), qgsDoubleToString( box.yMinimum(), wmsPrecision() ) );
bBoxElem.setAttribute( QStringLiteral( "maxy" ), qgsDoubleToString( box.yMaximum(), wmsPrecision() ) );
featureElement.appendChild( bBoxElem );
}

Expand Down Expand Up @@ -1787,7 +1787,7 @@ namespace QgsWms
}
QDomElement geometryElement = infoDocument.createElement( QStringLiteral( "Attribute" ) );
geometryElement.setAttribute( QStringLiteral( "name" ), QStringLiteral( "geometry" ) );
geometryElement.setAttribute( QStringLiteral( "value" ), geom.asWkt( getWMSPrecision() ) );
geometryElement.setAttribute( QStringLiteral( "value" ), geom.asWkt( wmsPrecision() ) );
geometryElement.setAttribute( QStringLiteral( "type" ), QStringLiteral( "derived" ) );
featureElement.appendChild( geometryElement );
}
Expand Down Expand Up @@ -2459,11 +2459,11 @@ namespace QgsWms
QDomElement boxElem;
if ( version < 3 )
{
boxElem = QgsOgcUtils::rectangleToGMLBox( &box, doc, getWMSPrecision() );
boxElem = QgsOgcUtils::rectangleToGMLBox( &box, doc, wmsPrecision() );
}
else
{
boxElem = QgsOgcUtils::rectangleToGMLEnvelope( &box, doc, getWMSPrecision() );
boxElem = QgsOgcUtils::rectangleToGMLEnvelope( &box, doc, wmsPrecision() );
}

if ( crs.isValid() )
Expand All @@ -2487,11 +2487,11 @@ namespace QgsWms
QDomElement gmlElem;
if ( version < 3 )
{
gmlElem = QgsOgcUtils::geometryToGML( geom, doc, getWMSPrecision() );
gmlElem = QgsOgcUtils::geometryToGML( geom, doc, wmsPrecision() );
}
else
{
gmlElem = QgsOgcUtils::geometryToGML( geom, doc, QStringLiteral( "GML3" ), getWMSPrecision() );
gmlElem = QgsOgcUtils::geometryToGML( geom, doc, QStringLiteral( "GML3" ), wmsPrecision() );
}

if ( !gmlElem.isNull() )
Expand Down Expand Up @@ -2564,7 +2564,7 @@ namespace QgsWms
return value;
}

int QgsRenderer::getImageQuality() const
int QgsRenderer::imageQuality() const
{
// First taken from QGIS project
int imageQuality = QgsServerProjectUtils::wmsImageQuality( *mProject );
Expand All @@ -2578,7 +2578,7 @@ namespace QgsWms
return imageQuality;
}

int QgsRenderer::getWMSPrecision() const
int QgsRenderer::wmsPrecision() const
{
// First taken from QGIS project and the default value is 6
int WMSPrecision = QgsServerProjectUtils::wmsFeatureInfoPrecision( *mProject );
Expand Down
4 changes: 2 additions & 2 deletions src/server/services/wms/qgswmsrenderer.h
Expand Up @@ -309,10 +309,10 @@ namespace QgsWms
public:

//! Returns the image quality to use for getMap request
int getImageQuality() const;
int imageQuality() const;

//! Returns the precision to use for GetFeatureInfo request
int getWMSPrecision() const;
int wmsPrecision() const;

};

Expand Down

0 comments on commit d67875f

Please sign in to comment.