Skip to content

Commit 761cdaf

Browse files
committed
db provider: Use connection name instead of potentially empty database name when reporting connection success
1 parent 74d5844 commit 761cdaf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/providers/db2/qgsdb2newconnection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ bool QgsDb2NewConnection::testConnection()
176176
if ( errMsg.isEmpty() )
177177
{
178178
QgsDebugMsg( "connection open succeeded " + connInfo );
179-
bar->pushMessage( tr( "Connection to %1 was successful." ).arg( txtDatabase->text() ),
179+
bar->pushMessage( tr( "Connection to %1 was successful." ).arg( txtName->text() ),
180180
Qgis::Info );
181181
return true;
182182
}

src/providers/oracle/qgsoraclenewconnection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void QgsOracleNewConnection::testConnection()
159159
if ( conn )
160160
{
161161
// Database successfully opened; we can now issue SQL commands.
162-
bar->pushMessage( tr( "Connection to %1 was successful." ).arg( txtDatabase->text() ),
162+
bar->pushMessage( tr( "Connection to %1 was successful." ).arg( txtName->text() ),
163163
Qgis::Info );
164164
// free connection resources
165165
QgsOracleConnPool::instance()->releaseConnection( conn );

src/providers/postgres/qgspgnewconnection.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void QgsPgNewConnection::testConnection()
205205
if ( conn )
206206
{
207207
// Database successfully opened; we can now issue SQL commands.
208-
bar->pushMessage( tr( "Connection to %1 was successful." ).arg( txtDatabase->text() ),
208+
bar->pushMessage( tr( "Connection to %1 was successful." ).arg( txtName->text() ),
209209
Qgis::Info );
210210

211211
// free pg connection resources

0 commit comments

Comments
 (0)