Skip to content

Commit

Permalink
[postgres][db2] still save username when instructed too also with aut…
Browse files Browse the repository at this point in the history
…hcfg (backport 4ad3531)
  • Loading branch information
jef-n committed Apr 24, 2018
1 parent 4009e4f commit 9ce55ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/providers/db2/qgsdb2newconnection.cpp
Expand Up @@ -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() );

Expand Down
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspgnewconnection.cpp
Expand Up @@ -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() );

Expand Down

0 comments on commit 9ce55ca

Please sign in to comment.