Skip to content

Commit 64d2fc8

Browse files
author
jef
committedMay 12, 2010
fix #2707
git-svn-id: http://svn.osgeo.org/qgis/trunk@13470 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 328f7d7 commit 64d2fc8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,10 +2205,10 @@ QString QgsPostgresProvider::Conn::postgisVersion()
22052205
return postgisVersionInfo;
22062206
}
22072207

2208-
QByteArray QgsPostgresProvider::paramValue( QString fieldValue, const QString &defaultValue ) const
2208+
QString QgsPostgresProvider::paramValue( QString fieldValue, const QString &defaultValue ) const
22092209
{
22102210
if ( fieldValue.isNull() )
2211-
return QByteArray( 0 ); // QByteArray(0).isNull() is true
2211+
return QString::null;
22122212

22132213
if ( fieldValue == defaultValue && !defaultValue.isNull() )
22142214
{
@@ -2219,17 +2219,17 @@ QByteArray QgsPostgresProvider::paramValue( QString fieldValue, const QString &d
22192219
if ( PQgetisnull( result, 0, 0 ) )
22202220
{
22212221
PQclear( result );
2222-
return QByteArray( 0 ); // QByteArray(0).isNull() is true
2222+
return QString::null;
22232223
}
22242224
else
22252225
{
22262226
QString val = QString::fromUtf8( PQgetvalue( result, 0, 0 ) );
22272227
PQclear( result );
2228-
return val.toUtf8();
2228+
return val;
22292229
}
22302230
}
22312231

2232-
return fieldValue.toUtf8();
2232+
return fieldValue;
22332233
}
22342234

22352235
bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist )

‎src/providers/postgres/qgspostgresprovider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ class QgsPostgresProvider : public QgsVectorDataProvider
588588
void customEvent( QEvent *e );
589589

590590
void appendGeomString( QgsGeometry *geom, QString &geomParam ) const;
591-
QByteArray paramValue( QString fieldvalue, const QString &defaultValue ) const;
591+
QString paramValue( QString fieldvalue, const QString &defaultValue ) const;
592592

593593
class Conn
594594
{

0 commit comments

Comments
 (0)
Please sign in to comment.