Skip to content
Permalink
Browse files

Fix compiler warning

  • Loading branch information
m-kuhn authored and nirvn committed Jan 18, 2019
1 parent 6e0930a commit 01e2b80cdc073662fd8e5b78d265fb7d2c805222
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/expression/qgsexpressionfunction.cpp
@@ -4581,6 +4581,7 @@ static QVariant fcnLoadJson( const QVariantList &values, const QgsExpressionCont

static QVariant fcnWriteJson( const QVariantList &values, const QgsExpressionContext *, QgsExpression *parent, const QgsExpressionNodeFunction * )
{
Q_UNUSED( parent )
QJsonDocument document = QJsonDocument::fromVariant( values.at( 0 ) );
return document.toJson( QJsonDocument::Compact );
}
@@ -5299,9 +5300,9 @@ const QList<QgsExpressionFunction *> &QgsExpression::Functions()

//functions for maps
<< new QgsStaticExpressionFunction( QStringLiteral( "json_to_map" ), 1, fcnLoadJson, QStringLiteral( "Maps" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "load_json" ), 1, fcnLoadJson, QStringLiteral( "Maps" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "load_json" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "value" ) ), fcnLoadJson, QStringLiteral( "Maps" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "map_to_json" ), 1, fcnWriteJson, QStringLiteral( "Maps" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "write_json" ), 1, fcnWriteJson, QStringLiteral( "Maps" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "write_json" ), QgsExpressionFunction::ParameterList() << QgsExpressionFunction::Parameter( QStringLiteral( "json_string" ) ), fcnWriteJson, QStringLiteral( "Maps" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "hstore_to_map" ), 1, fcnHstoreToMap, QStringLiteral( "Maps" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "map_to_hstore" ), 1, fcnMapToHstore, QStringLiteral( "Maps" ) )
<< new QgsStaticExpressionFunction( QStringLiteral( "map" ), -1, fcnMap, QStringLiteral( "Maps" ) )

0 comments on commit 01e2b80

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