Skip to content
Permalink
Browse files

[Server] WMS Parameters: const QStringList &l

  • Loading branch information
rldhont committed Sep 19, 2017
1 parent 9ee829b commit 026b9b0fd255da56794b3c82ec1e2b039238bafc
Showing with 28 additions and 28 deletions.
  1. +16 −16 src/server/services/wms/qgswmsparameters.cpp
  2. +12 −12 src/server/services/wms/qgswmsparameters.h
@@ -927,12 +927,12 @@ namespace QgsWms
return value( name, mapId ).toString().split( delimiter, QString::SkipEmptyParts );
}

QList<int> QgsWmsParameters::toIntList( QStringList l, bool *error ) const
QList<int> QgsWmsParameters::toIntList( const QStringList &l, bool *error ) const
{
*error = false;
QList<int> elements;

Q_FOREACH ( QString element, l )
for ( const QString &element : l )
{
bool ok;
int e = element.toInt( &ok );
@@ -951,7 +951,7 @@ namespace QgsWms
return elements;
}

QList<int> QgsWmsParameters::toIntList( QStringList l, ParameterName p ) const
QList<int> QgsWmsParameters::toIntList( const QStringList &l, ParameterName p ) const
{
bool error;
QList<int> elements = toIntList( l, &error );
@@ -966,7 +966,7 @@ namespace QgsWms
return elements;
}

QList<int> QgsWmsParameters::toIntList( QStringList l, ParameterName p, int mapId ) const
QList<int> QgsWmsParameters::toIntList( const QStringList &l, ParameterName p, int mapId ) const
{
bool error;
QList<int> elements = toIntList( l, &error );
@@ -981,12 +981,12 @@ namespace QgsWms
return elements;
}

QList<float> QgsWmsParameters::toFloatList( QStringList l, bool *error ) const
QList<float> QgsWmsParameters::toFloatList( const QStringList &l, bool *error ) const
{
*error = false;
QList<float> elements;

Q_FOREACH ( QString element, l )
for ( const QString &element : l )
{
bool ok;
float e = element.toFloat( &ok );
@@ -1005,7 +1005,7 @@ namespace QgsWms
return elements;
}

QList<float> QgsWmsParameters::toFloatList( QStringList l, ParameterName p ) const
QList<float> QgsWmsParameters::toFloatList( const QStringList &l, ParameterName p ) const
{
bool error;
QList<float> elements = toFloatList( l, &error );
@@ -1020,7 +1020,7 @@ namespace QgsWms
return elements;
}

QList<float> QgsWmsParameters::toFloatList( QStringList l, ParameterName p, int mapId ) const
QList<float> QgsWmsParameters::toFloatList( const QStringList &l, ParameterName p, int mapId ) const
{
bool error;
QList<float> elements = toFloatList( l, &error );
@@ -1035,12 +1035,12 @@ namespace QgsWms
return elements;
}

QList<QColor> QgsWmsParameters::toColorList( QStringList l, bool *error ) const
QList<QColor> QgsWmsParameters::toColorList( const QStringList &l, bool *error ) const
{
*error = false;
QList<QColor> elements;

Q_FOREACH ( QString element, l )
for ( const QString &element : l )
{
QColor c = QColor( element );

@@ -1058,7 +1058,7 @@ namespace QgsWms
return elements;
}

QList<QColor> QgsWmsParameters::toColorList( QStringList l, ParameterName p ) const
QList<QColor> QgsWmsParameters::toColorList( const QStringList &l, ParameterName p ) const
{
bool error;
QList<QColor> elements = toColorList( l, &error );
@@ -1073,7 +1073,7 @@ namespace QgsWms
return elements;
}

QList<QColor> QgsWmsParameters::toColorList( QStringList l, ParameterName p, int mapId ) const
QList<QColor> QgsWmsParameters::toColorList( const QStringList &l, ParameterName p, int mapId ) const
{
bool error;
QList<QColor> elements = toColorList( l, &error );
@@ -1088,12 +1088,12 @@ namespace QgsWms
return elements;
}

QList<QgsGeometry> QgsWmsParameters::toGeomList( QStringList l, bool *error ) const
QList<QgsGeometry> QgsWmsParameters::toGeomList( const QStringList &l, bool *error ) const
{
*error = false;
QList<QgsGeometry> geometries;

Q_FOREACH ( QString wkt, l )
for ( const QString &wkt : l )
{
QgsGeometry g( QgsGeometry::fromWkt( wkt ) );

@@ -1111,7 +1111,7 @@ namespace QgsWms
return geometries;
}

QList<QgsGeometry> QgsWmsParameters::toGeomList( QStringList l, ParameterName p ) const
QList<QgsGeometry> QgsWmsParameters::toGeomList( const QStringList &l, ParameterName p ) const
{
bool error;
QList<QgsGeometry> elements = toGeomList( l, &error );
@@ -1126,7 +1126,7 @@ namespace QgsWms
return elements;
}

QList<QgsGeometry> QgsWmsParameters::toGeomList( QStringList l, ParameterName p, int mapId ) const
QList<QgsGeometry> QgsWmsParameters::toGeomList( const QStringList &l, ParameterName p, int mapId ) const
{
bool error;
QList<QgsGeometry> elements = toGeomList( l, &error );
@@ -830,18 +830,18 @@ namespace QgsWms
QgsRectangle toRectangle( ParameterName name, int mapId ) const;
QStringList toStringList( ParameterName name, char delimiter = ',' ) const;
QStringList toStringList( ParameterName name, int mapId, char delimiter = ',' ) const;
QList<int> toIntList( QStringList l, bool *error = Q_NULLPTR ) const;
QList<int> toIntList( QStringList l, ParameterName name ) const;
QList<int> toIntList( QStringList l, ParameterName name, int mapId ) const;
QList<float> toFloatList( QStringList l, bool *error = Q_NULLPTR ) const;
QList<float> toFloatList( QStringList l, ParameterName name ) const;
QList<float> toFloatList( QStringList l, ParameterName name, int mapId ) const;
QList<QColor> toColorList( QStringList l, bool *error = Q_NULLPTR ) const;
QList<QColor> toColorList( QStringList l, ParameterName name ) const;
QList<QColor> toColorList( QStringList l, ParameterName name, int mapId ) const;
QList<QgsGeometry> toGeomList( QStringList l, bool *error = Q_NULLPTR ) const;
QList<QgsGeometry> toGeomList( QStringList l, ParameterName name ) const;
QList<QgsGeometry> toGeomList( QStringList l, ParameterName name, int mapId ) const;
QList<int> toIntList( const QStringList &l, bool *error = Q_NULLPTR ) const;
QList<int> toIntList( const QStringList &l, ParameterName name ) const;
QList<int> toIntList( const QStringList &l, ParameterName name, int mapId ) const;
QList<float> toFloatList( const QStringList &l, bool *error = Q_NULLPTR ) const;
QList<float> toFloatList( const QStringList &l, ParameterName name ) const;
QList<float> toFloatList( const QStringList &l, ParameterName name, int mapId ) const;
QList<QColor> toColorList( const QStringList &l, bool *error = Q_NULLPTR ) const;
QList<QColor> toColorList( const QStringList &l, ParameterName name ) const;
QList<QColor> toColorList( const QStringList &l, ParameterName name, int mapId ) const;
QList<QgsGeometry> toGeomList( const QStringList &l, bool *error = Q_NULLPTR ) const;
QList<QgsGeometry> toGeomList( const QStringList &l, ParameterName name ) const;
QList<QgsGeometry> toGeomList( const QStringList &l, ParameterName name, int mapId ) const;

QgsServerRequest::Parameters mRequestParameters;
QMap<ParameterName, Parameter> mParameters;

0 comments on commit 026b9b0

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