Skip to content
Permalink
Browse files

Fix string to char comparison

  • Loading branch information
nyalldawson committed Apr 1, 2021
1 parent 6eed7a4 commit 184e635c5da61b5cba673f451c4be651699a356b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/postgres/qgspostgresconn.cpp
@@ -1244,11 +1244,11 @@ QString QgsPostgresConn::quotedJsonValue( const QVariant &value )
{
if ( value.isNull() || !value.isValid() )
return QStringLiteral( "null" );
// where json is a string literal just construct it from that rather than dump
// where json is a string literal just construct it from that rather than dump
if ( value.type() == QVariant::String )
{
QString valueStr = value.toString();
if ( valueStr.at( 0 ) == "\"" && valueStr.at( valueStr.size() - 1 ) == "\"" )
if ( valueStr.at( 0 ) == '\"' && valueStr.at( valueStr.size() - 1 ) == '\"' )
{
return quotedString( value.toString() );
}

0 comments on commit 184e635

Please sign in to comment.