File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ void QgsPgNewConnection::testConnection()
168168
169169 PGconn *pd = PQconnectdb ( conninfo.toLocal8Bit () ); // use what is set based on locale; after connecting, use Utf8
170170 // check the connection status
171- if ( PQstatus ( pd ) != CONNECTION_OK && QString::fromUtf8 ( PQerrorMessage ( pd ) ) == PQnoPasswordSupplied )
171+ if ( PQstatus ( pd ) != CONNECTION_OK )
172172 {
173173 QString username = txtUsername->text ();
174174 QString password = txtPassword->text ();
Original file line number Diff line number Diff line change @@ -445,7 +445,7 @@ void QgsPgSourceSelect::on_btnConnect_clicked()
445445
446446 pd = PQconnectdb ( m_privConnInfo.toLocal8Bit () ); // use what is set based on locale; after connecting, use Utf8
447447 // check the connection status
448- if ( PQstatus ( pd ) != CONNECTION_OK && QString::fromUtf8 ( PQerrorMessage ( pd ) ) == PQnoPasswordSupplied )
448+ if ( PQstatus ( pd ) != CONNECTION_OK )
449449 {
450450 while ( PQstatus ( pd ) != CONNECTION_OK )
451451 {
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ QgsPostgresProvider::Conn *QgsPostgresProvider::Conn::connectDb( const QString &
215215
216216 PGconn *pd = PQconnectdb ( conninfo.toLocal8Bit () ); // use what is set based on locale; after connecting, use Utf8
217217 // check the connection status
218- if ( PQstatus ( pd ) != CONNECTION_OK && QString::fromUtf8 ( PQerrorMessage ( pd ) ) == PQnoPasswordSupplied )
218+ if ( PQstatus ( pd ) != CONNECTION_OK )
219219 {
220220 QgsDataSourceURI uri ( conninfo );
221221 QString username = uri.username ();
You can’t perform that action at this time.
0 commit comments