Skip to content
Permalink
Browse files

Fix sip binding

  • Loading branch information
pblottiere committed Jul 2, 2018
1 parent 7692e35 commit 6e1f14bd9ea72948348c10506035d39933117338
@@ -195,7 +195,7 @@ defined.
%End

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


};
@@ -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;
}
@@ -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;

@@ -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();
@@ -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;
@@ -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 ) )
{
@@ -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() )
@@ -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();
@@ -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;
}
@@ -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 );

0 comments on commit 6e1f14b

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