Skip to content

Commit

Permalink
[Server] WMS Parameters: const QVariant &value
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Sep 19, 2017
1 parent 29a5ccf commit 9ee829b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/server/services/wms/qgswmsparameters.cpp
Expand Up @@ -688,7 +688,7 @@ namespace QgsWms
return version;
}

double QgsWmsParameters::toDouble( QVariant value, const QVariant &defaultValue, bool *error ) const
double QgsWmsParameters::toDouble( const QVariant &value, const QVariant &defaultValue, bool *error ) const
{
double val = defaultValue.toDouble();
QString valStr = value.toString();
Expand Down Expand Up @@ -733,7 +733,7 @@ namespace QgsWms
return val;
}

bool QgsWmsParameters::toBool( QVariant value, const QVariant &defaultValue ) const
bool QgsWmsParameters::toBool( const QVariant &value, const QVariant &defaultValue ) const
{
bool val = defaultValue.toBool();
QString valStr = value.toString();
Expand All @@ -754,7 +754,7 @@ namespace QgsWms
return toBool( value( p, mapId ), defaultValue( p, mapId ) );
}

int QgsWmsParameters::toInt( QVariant value, const QVariant &defaultValue, bool *error ) const
int QgsWmsParameters::toInt( const QVariant &value, const QVariant &defaultValue, bool *error ) const
{
int val = defaultValue.toInt();
QString valStr = value.toString();
Expand Down Expand Up @@ -799,7 +799,7 @@ namespace QgsWms
return val;
}

QColor QgsWmsParameters::toColor( QVariant value, const QVariant &defaultValue, bool *error ) const
QColor QgsWmsParameters::toColor( const QVariant &value, const QVariant &defaultValue, bool *error ) const
{
*error = false;
QColor c = defaultValue.value<QColor>();
Expand Down Expand Up @@ -849,7 +849,7 @@ namespace QgsWms
return c;
}

QgsRectangle QgsWmsParameters::toRectangle( QVariant value, bool *error ) const
QgsRectangle QgsWmsParameters::toRectangle( const QVariant &value, bool *error ) const
{
*error = false;
QString bbox = value.toString();
Expand Down
10 changes: 5 additions & 5 deletions src/server/services/wms/qgswmsparameters.h
Expand Up @@ -813,19 +813,19 @@ namespace QgsWms
QVariant value( ParameterName name, int mapId ) const;
QVariant defaultValue( ParameterName name, int mapId ) const;
void log( const QString &msg ) const;
double toDouble( QVariant value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
double toDouble( const QVariant &value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
double toDouble( ParameterName name ) const;
double toDouble( ParameterName name, int mapId ) const;
bool toBool( QVariant value, const QVariant &defaultValue ) const;
bool toBool( const QVariant &value, const QVariant &defaultValue ) const;
bool toBool( ParameterName name ) const;
bool toBool( ParameterName name, int mapId ) const;
int toInt( QVariant value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
int toInt( const QVariant &value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
int toInt( ParameterName name ) const;
int toInt( ParameterName name, int mapId ) const;
QColor toColor( QVariant value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
QColor toColor( const QVariant &value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
QColor toColor( ParameterName name ) const;
QColor toColor( ParameterName name, int mapId ) const;
QgsRectangle toRectangle( QVariant value, bool *error = Q_NULLPTR ) const;
QgsRectangle toRectangle( const QVariant &value, bool *error = Q_NULLPTR ) const;
QgsRectangle toRectangle( ParameterName name ) const;
QgsRectangle toRectangle( ParameterName name, int mapId ) const;
QStringList toStringList( ParameterName name, char delimiter = ',' ) const;
Expand Down

0 comments on commit 9ee829b

Please sign in to comment.