Skip to content
Permalink
Browse files
add QStringLiteral
  • Loading branch information
troopa81 authored and nyalldawson committed Nov 1, 2021
1 parent 9ba9692 commit 55dfd576c62f9ffb7045c26c844f1950a19398ab
Showing with 4 additions and 5 deletions.
  1. +2 −3 src/core/qgsfield.cpp
  2. +2 −2 src/gui/qgsexpressionbuilderwidget.cpp
@@ -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;
@@ -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

0 comments on commit 55dfd57

Please sign in to comment.