Skip to content

Commit

Permalink
Quote keys
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 24, 2018
1 parent 40d0dfa commit 65fd187
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpression.cpp
Expand Up @@ -912,7 +912,7 @@ QString QgsExpression::formatPreviewString( const QVariant &value )
if ( separator.isEmpty() )
separator = QStringLiteral( ", " );

mapStr.append( QStringLiteral( "\"%1\": %2" ).arg( it.key(), formatPreviewString( it.value() ) ) );
mapStr.append( QStringLiteral( "%1: %2" ).arg( quotedValue( it.key() ), formatPreviewString( it.value() ) ) );
if ( mapStr.length() > MAX_PREVIEW + 5 )
{
mapStr = tr( "%1…" ).arg( mapStr.left( MAX_PREVIEW ) );
Expand Down

0 comments on commit 65fd187

Please sign in to comment.