Skip to content
Permalink
Browse files

[Server] WMS Parameters: const QVariant &defaultValue

  • Loading branch information
rldhont committed Sep 14, 2017
1 parent f316518 commit 29a5ccfb2cd264bac96b710e0dbf620edf108474
Showing with 8 additions and 8 deletions.
  1. +4 −4 src/server/services/wms/qgswmsparameters.cpp
  2. +4 −4 src/server/services/wms/qgswmsparameters.h
@@ -688,7 +688,7 @@ namespace QgsWms
return version;
}

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

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

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

QColor QgsWmsParameters::toColor( QVariant value, QVariant defaultValue, bool *error ) const
QColor QgsWmsParameters::toColor( QVariant value, const QVariant &defaultValue, bool *error ) const
{
*error = false;
QColor c = defaultValue.value<QColor>();
@@ -813,16 +813,16 @@ 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, QVariant defaultValue, bool *error = Q_NULLPTR ) const;
double toDouble( 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, QVariant defaultValue ) const;
bool toBool( QVariant value, const QVariant &defaultValue ) const;
bool toBool( ParameterName name ) const;
bool toBool( ParameterName name, int mapId ) const;
int toInt( QVariant value, QVariant defaultValue, bool *error = Q_NULLPTR ) const;
int toInt( 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, QVariant defaultValue, bool *error = Q_NULLPTR ) const;
QColor toColor( 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;

0 comments on commit 29a5ccf

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