Skip to content
Permalink
Browse files

[auth] Removed configuration checkbox for auto clear

  • Loading branch information
elpaso committed Oct 23, 2017
1 parent 9901471 commit 67b93418706a76a430a4340c4efb0c6e82c632c3
Showing with 6 additions and 9 deletions.
  1. +1 −1 src/gui/auth/qgsautheditorwidgets.cpp
  2. +5 −8 src/gui/auth/qgsauthsslerrorsdialog.cpp
@@ -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 );
@@ -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 );
@@ -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();

0 comments on commit 67b9341

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