Skip to content

Commit

Permalink
[auth] Removed configuration checkbox for auto clear
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 23, 2017
1 parent 9901471 commit 67b9341
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/gui/auth/qgsautheditorwidgets.cpp
Expand Up @@ -151,7 +151,7 @@ void QgsAuthEditorWidgets::setupUtilitiesMenu()
mActionClearAccessCacheNow = new QAction( QStringLiteral( "Clear network authentication access cache" ), this );
mActionAutoClearAccessCache = new QAction( QStringLiteral( "Automatically clear network authentication access cache on SSL errors" ), this );
mActionAutoClearAccessCache->setCheckable( true );
mActionAutoClearAccessCache->setChecked( QgsSettings().value( QStringLiteral( "clear_auth_cache_on_errors" ), false, QgsSettings::Section::Auth ).toBool( ) );
mActionAutoClearAccessCache->setChecked( QgsSettings().value( QStringLiteral( "clear_auth_cache_on_errors" ), true, QgsSettings::Section::Auth ).toBool( ) );

mActionPasswordHelperSync = new QAction( tr( "Store/update the master password in your %1" )
.arg( QgsAuthManager::AUTH_PASSWORD_HELPER_DISPLAY_NAME ), this );
Expand Down
13 changes: 5 additions & 8 deletions src/gui/auth/qgsauthsslerrorsdialog.cpp
Expand Up @@ -56,11 +56,6 @@ QgsAuthSslErrorsDialog::QgsAuthSslErrorsDialog( QNetworkReply *reply,
}

setupUi( this );
cbClearAuthCacheOnErrors->setChecked( QgsSettings().value( QStringLiteral( "clear_auth_cache_on_errors" ), false, QgsSettings::Section::Auth ).toBool( ) );
connect( cbClearAuthCacheOnErrors, &QCheckBox::clicked, this, [ ]( bool checked )
{
QgsSettings().setValue( QStringLiteral( "clear_auth_cache_on_errors" ), checked, QgsSettings::Section::Auth );
} );
connect( buttonBox, &QDialogButtonBox::clicked, this, &QgsAuthSslErrorsDialog::buttonBox_clicked );
connect( btnChainInfo, &QToolButton::clicked, this, &QgsAuthSslErrorsDialog::btnChainInfo_clicked );
connect( btnChainCAs, &QToolButton::clicked, this, &QgsAuthSslErrorsDialog::btnChainCAs_clicked );
Expand Down Expand Up @@ -194,9 +189,11 @@ void QgsAuthSslErrorsDialog::buttonBox_clicked( QAbstractButton *button )
reject();
break;
}
// Clear access cache
if ( QgsSettings().value( QStringLiteral( "clear_auth_cache_on_errors" ),
false,
// Clear access cache if the user choose ignore and the
// setting allows it
if ( btnenum == QDialogButtonBox::Abort &&
QgsSettings().value( QStringLiteral( "clear_auth_cache_on_errors" ),
true,
QgsSettings::Section::Auth ).toBool( ) )
{
QgsNetworkAccessManager::instance()->clearAccessCache();
Expand Down

0 comments on commit 67b9341

Please sign in to comment.