Skip to content
Permalink
Browse files

[postgres][db2] still save username when instructed too also with aut…

…hcfg (backport 4ad3531)
  • Loading branch information
jef-n committed Apr 24, 2018
1 parent 4009e4f commit 9ce55ca08efbcb645dde1c01dbbedf7553c27583
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/providers/db2/qgsdb2newconnection.cpp
  2. +2 −2 src/providers/postgres/qgspgnewconnection.cpp
@@ -120,9 +120,9 @@ void QgsDb2NewConnection::accept()
settings.setValue( baseKey + "/port", txtPort->text() );
settings.setValue( baseKey + "/driver", txtDriver->text() );
settings.setValue( baseKey + "/database", txtDatabase->text() );
settings.setValue( baseKey + "/username", chkStoreUsername->isChecked() && !hasAuthConfigID ? txtUsername->text() : "" );
settings.setValue( baseKey + "/username", chkStoreUsername->isChecked() ? txtUsername->text() : "" );
settings.setValue( baseKey + "/password", chkStorePassword->isChecked() && !hasAuthConfigID ? txtPassword->text() : "" );
settings.setValue( baseKey + "/saveUsername", chkStoreUsername->isChecked() && !hasAuthConfigID ? "true" : "false" );
settings.setValue( baseKey + "/saveUsername", chkStoreUsername->isChecked() ? "true" : "false" );
settings.setValue( baseKey + "/savePassword", chkStorePassword->isChecked() && !hasAuthConfigID ? "true" : "false" );
settings.setValue( baseKey + "/authcfg", mAuthConfigSelect->configId() );

@@ -146,15 +146,15 @@ void QgsPgNewConnection::accept()
settings.setValue( baseKey + "/host", txtHost->text() );
settings.setValue( baseKey + "/port", txtPort->text() );
settings.setValue( baseKey + "/database", txtDatabase->text() );
settings.setValue( baseKey + "/username", chkStoreUsername->isChecked() && !hasAuthConfigID ? txtUsername->text() : "" );
settings.setValue( baseKey + "/username", chkStoreUsername->isChecked() ? txtUsername->text() : "" );
settings.setValue( baseKey + "/password", chkStorePassword->isChecked() && !hasAuthConfigID ? txtPassword->text() : "" );
settings.setValue( baseKey + "/authcfg", mAuthConfigSelect->configId() );
settings.setValue( baseKey + "/publicOnly", cb_publicSchemaOnly->isChecked() );
settings.setValue( baseKey + "/geometryColumnsOnly", cb_geometryColumnsOnly->isChecked() );
settings.setValue( baseKey + "/dontResolveType", cb_dontResolveType->isChecked() );
settings.setValue( baseKey + "/allowGeometrylessTables", cb_allowGeometrylessTables->isChecked() );
settings.setValue( baseKey + "/sslmode", cbxSSLmode->itemData( cbxSSLmode->currentIndex() ).toInt() );
settings.setValue( baseKey + "/saveUsername", chkStoreUsername->isChecked() && !hasAuthConfigID ? "true" : "false" );
settings.setValue( baseKey + "/saveUsername", chkStoreUsername->isChecked() ? "true" : "false" );
settings.setValue( baseKey + "/savePassword", chkStorePassword->isChecked() && !hasAuthConfigID ? "true" : "false" );
settings.setValue( baseKey + "/estimatedMetadata", cb_useEstimatedMetadata->isChecked() );

0 comments on commit 9ce55ca

Please sign in to comment.
You can’t perform that action at this time.