Skip to content

Commit

Permalink
add QStringLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
troopa81 authored and github-actions[bot] committed Sep 30, 2021
1 parent 89fa824 commit 1c0e85f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/core/qgsfield.cpp
Expand Up @@ -344,13 +344,12 @@ QString QgsField::displayString( const QVariant &v ) const
}
else if ( d->type == QVariant::StringList || d->type == QVariant::List )
{
// we return an empty string if the list is empty, not a null string
QString result( "" );
QString result;
const QVariantList list = v.toList();
for ( const QVariant &var : list )
{
if ( !result.isEmpty() )
result.append( ", " );
result.append( QStringLiteral( ", " ) );
result.append( var.toString() );
}
return result;
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsexpressionbuilderwidget.cpp
Expand Up @@ -550,11 +550,11 @@ void QgsExpressionBuilderWidget::fillFieldValues( const QString &fieldName, int
for ( QString str : strList )
{
if ( !result.isEmpty() )
result.append( ", " );
result.append( QStringLiteral( ", " ) );

result.append( '\'' + str.replace( '\'', QLatin1String( "''" ) ) + '\'' );
}
strValue = QString( "array(%1)" ).arg( result );
strValue = QStringLiteral( "array(%1)" ).arg( result );
forceRepresentedValue = true;
}
else
Expand Down

0 comments on commit 1c0e85f

Please sign in to comment.