Skip to content

Commit 9ee829b

Browse files
committed
[Server] WMS Parameters: const QVariant &value
1 parent 29a5ccf commit 9ee829b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/server/services/wms/qgswmsparameters.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ namespace QgsWms
688688
return version;
689689
}
690690

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

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

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

802-
QColor QgsWmsParameters::toColor( QVariant value, const QVariant &defaultValue, bool *error ) const
802+
QColor QgsWmsParameters::toColor( const QVariant &value, const QVariant &defaultValue, bool *error ) const
803803
{
804804
*error = false;
805805
QColor c = defaultValue.value<QColor>();
@@ -849,7 +849,7 @@ namespace QgsWms
849849
return c;
850850
}
851851

852-
QgsRectangle QgsWmsParameters::toRectangle( QVariant value, bool *error ) const
852+
QgsRectangle QgsWmsParameters::toRectangle( const QVariant &value, bool *error ) const
853853
{
854854
*error = false;
855855
QString bbox = value.toString();

src/server/services/wms/qgswmsparameters.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,19 +813,19 @@ namespace QgsWms
813813
QVariant value( ParameterName name, int mapId ) const;
814814
QVariant defaultValue( ParameterName name, int mapId ) const;
815815
void log( const QString &msg ) const;
816-
double toDouble( QVariant value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
816+
double toDouble( const QVariant &value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
817817
double toDouble( ParameterName name ) const;
818818
double toDouble( ParameterName name, int mapId ) const;
819-
bool toBool( QVariant value, const QVariant &defaultValue ) const;
819+
bool toBool( const QVariant &value, const QVariant &defaultValue ) const;
820820
bool toBool( ParameterName name ) const;
821821
bool toBool( ParameterName name, int mapId ) const;
822-
int toInt( QVariant value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
822+
int toInt( const QVariant &value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
823823
int toInt( ParameterName name ) const;
824824
int toInt( ParameterName name, int mapId ) const;
825-
QColor toColor( QVariant value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
825+
QColor toColor( const QVariant &value, const QVariant &defaultValue, bool *error = Q_NULLPTR ) const;
826826
QColor toColor( ParameterName name ) const;
827827
QColor toColor( ParameterName name, int mapId ) const;
828-
QgsRectangle toRectangle( QVariant value, bool *error = Q_NULLPTR ) const;
828+
QgsRectangle toRectangle( const QVariant &value, bool *error = Q_NULLPTR ) const;
829829
QgsRectangle toRectangle( ParameterName name ) const;
830830
QgsRectangle toRectangle( ParameterName name, int mapId ) const;
831831
QStringList toStringList( ParameterName name, char delimiter = ',' ) const;

0 commit comments

Comments
 (0)