Navigation Menu

Skip to content

Commit

Permalink
Cascade change to variable initialisation to other files
Browse files Browse the repository at this point in the history
  • Loading branch information
stev-0 authored and m-kuhn committed Aug 15, 2019
1 parent 5e71c23 commit 01f9147
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialiteprovider.cpp
Expand Up @@ -4410,7 +4410,7 @@ bool QgsSpatiaLiteProvider::changeAttributeValues( const QgsChangedAttributesMap
QString jRepr;
try
{
const auto jObj { QgsJsonUtils::jsonFromVariant( val ) };
const auto jObj = QgsJsonUtils::jsonFromVariant( val );
if ( ! jObj.is_array() )
{
throw json::parse_error::create( 0, 0, tr( "JSON value must be an array" ).toStdString() );
Expand Down
6 changes: 3 additions & 3 deletions tests/src/core/testqgsjsonutils.cpp
Expand Up @@ -124,7 +124,7 @@ void TestQgsJsonUtils::testParseJson()

for ( const auto &testJson : tests )
{
const auto parsed { QgsJsonUtils::parseJson( testJson ) };
const auto parsed = QgsJsonUtils::parseJson( testJson );
QCOMPARE( QString::fromStdString( QgsJsonUtils::jsonFromVariant( parsed ).dump() ), testJson );
}

Expand Down Expand Up @@ -195,7 +195,7 @@ void TestQgsJsonUtils::testExportAttributesJson()
{
QBENCHMARK
{
const auto json { QgsJsonUtils::exportAttributes( feature, &vl ) };
const auto json = QgsJsonUtils::exportAttributes( feature, &vl );
QCOMPARE( json, QStringLiteral( "{\"fldtxt\":\"a value\",\n\"fldint\":1,\n\"flddbl\":2}" ) );
}
}
Expand All @@ -220,7 +220,7 @@ void TestQgsJsonUtils::testExportFeatureJson()

const auto j( exporter.exportFeatureToJsonObject( feature ) );
QCOMPARE( QString::fromStdString( j.dump() ), expectedJson );
const auto json { exporter.exportFeature( feature ) };
const auto json = exporter.exportFeature( feature );
QCOMPARE( json, expectedJson );

QgsJsonExporter exporterPrecision { &vl, 1 };
Expand Down

0 comments on commit 01f9147

Please sign in to comment.