Skip to content
Permalink
Browse files

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

…hcfg
  • Loading branch information
jef-n committed Apr 24, 2018
1 parent 774ccaf commit 4ad35311037f226880ac3dd30eec0f92d119ca1c
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/providers/db2/qgsdb2newconnection.cpp
  2. +2 −2 src/providers/postgres/qgspgnewconnection.cpp
@@ -115,9 +115,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", mAuthSettings->storeUsernameIsChecked( ) && !hasAuthConfigID ? mAuthSettings->username( ) : QLatin1String( "" ) );
settings.setValue( baseKey + "/username", mAuthSettings->storeUsernameIsChecked( ) ? mAuthSettings->username( ) : QLatin1String( "" ) );
settings.setValue( baseKey + "/password", mAuthSettings->storePasswordIsChecked( ) && !hasAuthConfigID ? mAuthSettings->password( ) : QLatin1String( "" ) );
settings.setValue( baseKey + "/saveUsername", mAuthSettings->storeUsernameIsChecked() && !hasAuthConfigID ? "true" : "false" );
settings.setValue( baseKey + "/saveUsername", mAuthSettings->storeUsernameIsChecked() ? "true" : "false" );
settings.setValue( baseKey + "/savePassword", mAuthSettings->storePasswordIsChecked( ) && !hasAuthConfigID ? "true" : "false" );
settings.setValue( baseKey + "/authcfg", mAuthSettings->configId() );

@@ -145,15 +145,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", mAuthSettings->storeUsernameIsChecked( ) && !hasAuthConfigID ? mAuthSettings->username() : QLatin1String( "" ) );
settings.setValue( baseKey + "/username", mAuthSettings->storeUsernameIsChecked( ) ? mAuthSettings->username() : QLatin1String( "" ) );
settings.setValue( baseKey + "/password", mAuthSettings->storePasswordIsChecked( ) && !hasAuthConfigID ? mAuthSettings->password() : QLatin1String( "" ) );
settings.setValue( baseKey + "/authcfg", mAuthSettings->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->currentData().toInt() );
settings.setValue( baseKey + "/saveUsername", mAuthSettings->storeUsernameIsChecked( ) && !hasAuthConfigID ? "true" : "false" );
settings.setValue( baseKey + "/saveUsername", mAuthSettings->storeUsernameIsChecked( ) ? "true" : "false" );
settings.setValue( baseKey + "/savePassword", mAuthSettings->storePasswordIsChecked( ) && !hasAuthConfigID ? "true" : "false" );
settings.setValue( baseKey + "/estimatedMetadata", cb_useEstimatedMetadata->isChecked() );

0 comments on commit 4ad3531

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