File tree 2 files changed +9
-15
lines changed
2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -84,18 +84,18 @@ bool QgsDb2ConnectionItem::ConnInfoFromParameters(
84
84
{
85
85
connInfo += " authcfg='" + authcfg + " ' " ;
86
86
}
87
- else // include user and password if authcfg is empty
87
+
88
+ if ( !password.isEmpty () )
88
89
{
89
- if ( !username.isEmpty () )
90
- {
91
- connInfo += " user='" + username + " ' " ;
92
- }
90
+ // include password if authcfg is empty
91
+ connInfo += " password='" + password + " ' " ;
92
+ }
93
93
94
- if ( !password.isEmpty () )
95
- {
96
- connInfo += " password='" + password + " ' " ;
97
- }
94
+ if ( !username.isEmpty () )
95
+ {
96
+ connInfo += " user='" + username + " ' " ;
98
97
}
98
+
99
99
QgsDebugMsg ( " connInfo: '" + connInfo + " '" );
100
100
return true ;
101
101
}
Original file line number Diff line number Diff line change @@ -1788,12 +1788,6 @@ QgsDataSourceUri QgsPostgresConn::connUri( const QString &connName )
1788
1788
1789
1789
QString authcfg = settings.value ( key + " /authcfg" ).toString ();
1790
1790
1791
- if ( !authcfg.isEmpty () )
1792
- {
1793
- username.clear ();
1794
- password.clear ();
1795
- }
1796
-
1797
1791
QgsDataSourceUri uri;
1798
1792
if ( !service.isEmpty () )
1799
1793
{
You can’t perform that action at this time.
0 commit comments