[QGIS Commit] r14380 - in trunk/qgis/src: app/postgres
providers/postgres
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Oct 14 11:42:55 EDT 2010
Author: jef
Date: 2010-10-14 08:42:55 -0700 (Thu, 14 Oct 2010)
New Revision: 14380
Modified:
trunk/qgis/src/app/postgres/qgspgnewconnection.cpp
trunk/qgis/src/app/postgres/qgspgsourceselect.cpp
trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
Log:
ask for postgres credentials on any connection error (not only missing password)
Modified: trunk/qgis/src/app/postgres/qgspgnewconnection.cpp
===================================================================
--- trunk/qgis/src/app/postgres/qgspgnewconnection.cpp 2010-10-14 15:24:19 UTC (rev 14379)
+++ trunk/qgis/src/app/postgres/qgspgnewconnection.cpp 2010-10-14 15:42:55 UTC (rev 14380)
@@ -168,7 +168,7 @@
PGconn *pd = PQconnectdb( conninfo.toLocal8Bit() ); // use what is set based on locale; after connecting, use Utf8
// check the connection status
- if ( PQstatus( pd ) != CONNECTION_OK && QString::fromUtf8( PQerrorMessage( pd ) ) == PQnoPasswordSupplied )
+ if ( PQstatus( pd ) != CONNECTION_OK )
{
QString username = txtUsername->text();
QString password = txtPassword->text();
Modified: trunk/qgis/src/app/postgres/qgspgsourceselect.cpp
===================================================================
--- trunk/qgis/src/app/postgres/qgspgsourceselect.cpp 2010-10-14 15:24:19 UTC (rev 14379)
+++ trunk/qgis/src/app/postgres/qgspgsourceselect.cpp 2010-10-14 15:42:55 UTC (rev 14380)
@@ -445,7 +445,7 @@
pd = PQconnectdb( m_privConnInfo.toLocal8Bit() ); // use what is set based on locale; after connecting, use Utf8
// check the connection status
- if ( PQstatus( pd ) != CONNECTION_OK && QString::fromUtf8( PQerrorMessage( pd ) ) == PQnoPasswordSupplied )
+ if ( PQstatus( pd ) != CONNECTION_OK )
{
while ( PQstatus( pd ) != CONNECTION_OK )
{
Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2010-10-14 15:24:19 UTC (rev 14379)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp 2010-10-14 15:42:55 UTC (rev 14380)
@@ -215,7 +215,7 @@
PGconn *pd = PQconnectdb( conninfo.toLocal8Bit() ); // use what is set based on locale; after connecting, use Utf8
// check the connection status
- if ( PQstatus( pd ) != CONNECTION_OK && QString::fromUtf8( PQerrorMessage( pd ) ) == PQnoPasswordSupplied )
+ if ( PQstatus( pd ) != CONNECTION_OK )
{
QgsDataSourceURI uri( conninfo );
QString username = uri.username();
More information about the QGIS-commit
mailing list