Skip to content

Commit

Permalink
Fix sip binding
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Jul 23, 2018
1 parent 7692e35 commit 6e1f14b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion python/server/auto_generated/qgsserverparameters.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ defined.
%End

protected:
virtual bool loadParameter( const QPair<QString, QString> &item );
virtual bool loadParameter( const QString &name, const QString &value );


};
Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsserverparameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,14 +431,14 @@ void QgsServerParameters::load( const QUrlQuery &query )
mParameters[name].raiseError();
}
}
else if ( ! loadParameter( item ) )
else if ( ! loadParameter( item.first, item.second ) )
{
mUnmanagedParameters[item.first.toUpper()] = item.second;
}
}
}

bool QgsServerParameters::loadParameter( const QPair<QString, QString> & )
bool QgsServerParameters::loadParameter( const QString &, const QString & )
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgsserverparameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class SERVER_EXPORT QgsServerParameters
QString version() const;

protected:
virtual bool loadParameter( const QPair<QString, QString> &item );
virtual bool loadParameter( const QString &name, const QString &value );

QMap<QString, QString> mUnmanagedParameters;

Expand Down
5 changes: 2 additions & 3 deletions src/server/services/wfs/qgswfsparameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,14 @@ namespace QgsWfs
load( parameters.urlQuery() );
}

bool QgsWfsParameters::loadParameter( const QPair<QString, QString> &parameter )
bool QgsWfsParameters::loadParameter( const QString &key, const QString &value )
{
bool loaded = false;

const QString key = parameter.first;
const QgsWfsParameter::Name name = QgsWfsParameter::name( key );
if ( name >= 0 )
{
mWfsParameters[name].mValue = parameter.second;
mWfsParameters[name].mValue = value;
if ( ! mWfsParameters[name].isValid() )
{
mWfsParameters[name].raiseError();
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wfs/qgswfsparameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ namespace QgsWfs
QString geometryNameAsString() const;

private:
bool loadParameter( const QPair<QString, QString> &parameter ) override;
bool loadParameter( const QString &name, const QString &key ) override;
void save( const QgsWfsParameter &parameter );

void log( const QString &msg ) const;
Expand Down
9 changes: 4 additions & 5 deletions src/server/services/wms/qgswmsparameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,10 @@ namespace QgsWms
load( parameters.urlQuery() );
}

bool QgsWmsParameters::loadParameter( const QPair<QString, QString> &parameter )
bool QgsWmsParameters::loadParameter( const QString &key, const QString &value )
{
bool loaded = false;

const QString key = parameter.first;
const QRegExp composerParamRegExp( QStringLiteral( "^MAP\\d+:" ) );
if ( key.contains( composerParamRegExp ) )
{
Expand All @@ -487,7 +486,7 @@ namespace QgsWms
if ( name >= 0 )
{
QgsWmsParameter param = mWmsParameters[name];
param.mValue = parameter.second;
param.mValue = value;
param.mId = mapId;

if ( ! param.isValid() )
Expand All @@ -504,7 +503,7 @@ namespace QgsWms
const QgsWmsParameter::Name name = QgsWmsParameter::name( key );
if ( name >= 0 )
{
mWmsParameters[name].mValue = parameter.second;
mWmsParameters[name].mValue = value;
if ( ! mWmsParameters[name].isValid() )
{
mWmsParameters[name].raiseError();
Expand All @@ -519,7 +518,7 @@ namespace QgsWms
{
QString id = key.left( separator );
QString param = key.right( key.length() - separator - 1 );
mExternalWMSParameters[id].insert( param, parameter.second );
mExternalWMSParameters[id].insert( param, value );

loaded = true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsparameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ namespace QgsWms
QString layoutParameter( const QString &id, bool &ok ) const;

private:
bool loadParameter( const QPair<QString, QString> &parameter ) override;
bool loadParameter( const QString &name, const QString &value ) override;

void save( const QgsWmsParameter &parameter, bool multi = false );

Expand Down

0 comments on commit 6e1f14b

Please sign in to comment.