From d038ef8af280c3cb02fe5be3755f5a3a141224a8 Mon Sep 17 00:00:00 2001 From: jef Date: Sat, 7 Nov 2009 23:33:41 +0000 Subject: [PATCH] fix postgres error messages git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11992 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/providers/postgres/qgspostgresprovider.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index d39b0dd4f2c5..7c112497e73a 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -104,9 +104,10 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri ) if ( PQresultStatus( testAccess ) != PGRES_TUPLES_OK ) { showMessageBox( tr( "Unable to access relation" ), - tr( "Unable to access the %1 relation.\n" ).arg( mSchemaTableName ) - + tr( "The error message from the database was:\n%1.\nSQL: %2" ) - .arg( QString::fromUtf8( PQresultErrorMessage( testAccess ) ).arg( sql ) ) ); + tr( "Unable to access the %1 relation.\nThe error message from the database was:\n%2.\nSQL: %3" ) + .arg( mSchemaTableName ) + .arg( QString::fromUtf8( PQresultErrorMessage( testAccess ) ) ) + .arg( sql ) ); valid = false; disconnectDb(); return; @@ -123,9 +124,10 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri ) if ( PQresultStatus( testAccess ) != PGRES_TUPLES_OK ) { showMessageBox( tr( "Unable to access relation" ), - tr( "Unable to determine table access privileges for the %1 relation.\n" ).arg( mSchemaTableName ) - + tr( "The error message from the database was:\n%1.\nSQL: %2" ) - .arg( QString::fromUtf8( PQresultErrorMessage( testAccess ) ) ).arg( sql ) ); + tr( "Unable to determine table access privileges for the %1 relation.\nThe error message from the database was:\n%2.\nSQL: %3" ) + .arg( mSchemaTableName ) + .arg( QString::fromUtf8( PQresultErrorMessage( testAccess ) ) ) + .arg( sql ) ); valid = false; disconnectDb(); return;