Skip to content
Permalink
Browse files
fix #2707
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13470 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed May 12, 2010
1 parent 2e41442 commit d8adf0be04d1aa6b04877f0c378ac298e51aea18
Showing with 6 additions and 6 deletions.
  1. +5 −5 src/providers/postgres/qgspostgresprovider.cpp
  2. +1 −1 src/providers/postgres/qgspostgresprovider.h
@@ -2205,10 +2205,10 @@ QString QgsPostgresProvider::Conn::postgisVersion()
return postgisVersionInfo;
}

QByteArray QgsPostgresProvider::paramValue( QString fieldValue, const QString &defaultValue ) const
QString QgsPostgresProvider::paramValue( QString fieldValue, const QString &defaultValue ) const
{
if ( fieldValue.isNull() )
return QByteArray( 0 ); // QByteArray(0).isNull() is true
return QString::null;

if ( fieldValue == defaultValue && !defaultValue.isNull() )
{
@@ -2219,17 +2219,17 @@ QByteArray QgsPostgresProvider::paramValue( QString fieldValue, const QString &d
if ( PQgetisnull( result, 0, 0 ) )
{
PQclear( result );
return QByteArray( 0 ); // QByteArray(0).isNull() is true
return QString::null;
}
else
{
QString val = QString::fromUtf8( PQgetvalue( result, 0, 0 ) );
PQclear( result );
return val.toUtf8();
return val;
}
}

return fieldValue.toUtf8();
return fieldValue;
}

bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist )
@@ -588,7 +588,7 @@ class QgsPostgresProvider : public QgsVectorDataProvider
void customEvent( QEvent *e );

void appendGeomString( QgsGeometry *geom, QString &geomParam ) const;
QByteArray paramValue( QString fieldvalue, const QString &defaultValue ) const;
QString paramValue( QString fieldvalue, const QString &defaultValue ) const;

class Conn
{

0 comments on commit d8adf0b

Please sign in to comment.