[QGIS Commit] r11992 - trunk/qgis/src/providers/postgres

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Nov 7 18:33:41 EST 2009


Author: jef
Date: 2009-11-07 18:33:41 -0500 (Sat, 07 Nov 2009)
New Revision: 11992

Modified:
   trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
Log:
fix postgres error messages

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2009-11-07 23:32:12 UTC (rev 11991)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2009-11-07 23:33:41 UTC (rev 11992)
@@ -104,9 +104,10 @@
   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 @@
   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;



More information about the QGIS-commit mailing list