Skip to content
Permalink
Browse files

[auth] Change static members prefix from 'm' to 's' as per coding sta…

…ndards
  • Loading branch information
elpaso committed Oct 11, 2017
1 parent ee89bf5 commit 79837b04f557791da6aace5228fa9786d800cc21
@@ -26,7 +26,7 @@
static const QString AUTH_METHOD_KEY = "Basic";
static const QString AUTH_METHOD_DESCRIPTION = "Basic authentication";

QMap<QString, QgsAuthMethodConfig> QgsAuthBasicMethod::mAuthConfigCache = QMap<QString, QgsAuthMethodConfig>();
QMap<QString, QgsAuthMethodConfig> QgsAuthBasicMethod::sAuthConfigCache = QMap<QString, QgsAuthMethodConfig>();


QgsAuthBasicMethod::QgsAuthBasicMethod()
@@ -156,9 +156,9 @@ QgsAuthMethodConfig QgsAuthBasicMethod::getMethodConfig( const QString &authcfg,
QgsAuthMethodConfig mconfig;

// check if it is cached
if ( mAuthConfigCache.contains( authcfg ) )
if ( sAuthConfigCache.contains( authcfg ) )
{
mconfig = mAuthConfigCache.value( authcfg );
mconfig = sAuthConfigCache.value( authcfg );
QgsDebugMsg( QString( "Retrieved config for authcfg: %1" ).arg( authcfg ) );
return mconfig;
}
@@ -181,15 +181,15 @@ void QgsAuthBasicMethod::putMethodConfig( const QString &authcfg, const QgsAuthM
{
QMutexLocker locker( &mConfigMutex );
QgsDebugMsg( QString( "Putting basic config for authcfg: %1" ).arg( authcfg ) );
mAuthConfigCache.insert( authcfg, mconfig );
sAuthConfigCache.insert( authcfg, mconfig );
}

void QgsAuthBasicMethod::removeMethodConfig( const QString &authcfg )
{
QMutexLocker locker( &mConfigMutex );
if ( sAuthConfigCache.contains( authcfg ) )
{
mAuthConfigCache.remove( authcfg );
sAuthConfigCache.remove( authcfg );
QgsDebugMsg( QString( "Removed basic config for authcfg: %1" ).arg( authcfg ) );
}
}
@@ -34,7 +34,7 @@
static const QString AUTH_METHOD_KEY = "Identity-Cert";
static const QString AUTH_METHOD_DESCRIPTION = "Identity certificate authentication";

QMap<QString, QgsPkiConfigBundle *> QgsAuthIdentCertMethod::mPkiConfigBundleCache = QMap<QString, QgsPkiConfigBundle *>();
QMap<QString, QgsPkiConfigBundle *> QgsAuthIdentCertMethod::sPkiConfigBundleCache = QMap<QString, QgsPkiConfigBundle *>();


QgsAuthIdentCertMethod::QgsAuthIdentCertMethod()
@@ -226,9 +226,9 @@ QgsPkiConfigBundle *QgsAuthIdentCertMethod::getPkiConfigBundle( const QString &a
QgsPkiConfigBundle *bundle = nullptr;

// check if it is cached
if ( mPkiConfigBundleCache.contains( authcfg ) )
if ( sPkiConfigBundleCache.contains( authcfg ) )
{
bundle = mPkiConfigBundleCache.value( authcfg );
bundle = sPkiConfigBundleCache.value( authcfg );
if ( bundle )
{
QgsDebugMsg( QString( "Retrieved PKI bundle for authcfg %1" ).arg( authcfg ) );
@@ -278,15 +278,15 @@ void QgsAuthIdentCertMethod::putPkiConfigBundle( const QString &authcfg, QgsPkiC
{
QMutexLocker locker( &mConfigMutex );
QgsDebugMsg( QString( "Putting PKI bundle for authcfg %1" ).arg( authcfg ) );
mPkiConfigBundleCache.insert( authcfg, pkibundle );
sPkiConfigBundleCache.insert( authcfg, pkibundle );
}

void QgsAuthIdentCertMethod::removePkiConfigBundle( const QString &authcfg )
{
QMutexLocker locker( &mConfigMutex );
if ( sPkiConfigBundleCache.contains( authcfg ) )
{
QgsPkiConfigBundle * pkibundle = mPkiConfigBundleCache.take( authcfg );
QgsPkiConfigBundle * pkibundle = sPkiConfigBundleCache.take( authcfg );
delete pkibundle;
pkibundle = nullptr;
QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) );
@@ -35,7 +35,7 @@
static const QString AUTH_METHOD_KEY = "PKI-Paths";
static const QString AUTH_METHOD_DESCRIPTION = "PKI paths authentication";

QMap<QString, QgsPkiConfigBundle *> QgsAuthPkiPathsMethod::mPkiConfigBundleCache = QMap<QString, QgsPkiConfigBundle *>();
QMap<QString, QgsPkiConfigBundle *> QgsAuthPkiPathsMethod::sPkiConfigBundleCache = QMap<QString, QgsPkiConfigBundle *>();


QgsAuthPkiPathsMethod::QgsAuthPkiPathsMethod()
@@ -230,9 +230,9 @@ QgsPkiConfigBundle *QgsAuthPkiPathsMethod::getPkiConfigBundle( const QString &au
QgsPkiConfigBundle *bundle = nullptr;

// check if it is cached
if ( mPkiConfigBundleCache.contains( authcfg ) )
if ( sPkiConfigBundleCache.contains( authcfg ) )
{
bundle = mPkiConfigBundleCache.value( authcfg );
bundle = sPkiConfigBundleCache.value( authcfg );
if ( bundle )
{
QgsDebugMsg( QString( "Retrieved PKI bundle for authcfg %1" ).arg( authcfg ) );
@@ -280,15 +280,15 @@ void QgsAuthPkiPathsMethod::putPkiConfigBundle( const QString &authcfg, QgsPkiCo
{
QMutexLocker locker( &mConfigMutex );
QgsDebugMsg( QString( "Putting PKI bundle for authcfg %1" ).arg( authcfg ) );
mPkiConfigBundleCache.insert( authcfg, pkibundle );
sPkiConfigBundleCache.insert( authcfg, pkibundle );
}

void QgsAuthPkiPathsMethod::removePkiConfigBundle( const QString &authcfg )
{
QMutexLocker locker( &mConfigMutex );
if ( sPkiConfigBundleCache.contains( authcfg ) )
{
QgsPkiConfigBundle * pkibundle = mPkiConfigBundleCache.take( authcfg );
QgsPkiConfigBundle * pkibundle = sPkiConfigBundleCache.take( authcfg );
delete pkibundle;
pkibundle = nullptr;
QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) );
@@ -35,7 +35,7 @@
static const QString AUTH_METHOD_KEY = "PKI-PKCS#12";
static const QString AUTH_METHOD_DESCRIPTION = "PKI PKCS#12 authentication";

QMap<QString, QgsPkiConfigBundle *> QgsAuthPkcs12Method::mPkiConfigBundleCache = QMap<QString, QgsPkiConfigBundle *>();
QMap<QString, QgsPkiConfigBundle *> QgsAuthPkcs12Method::sPkiConfigBundleCache = QMap<QString, QgsPkiConfigBundle *>();


QgsAuthPkcs12Method::QgsAuthPkcs12Method()
@@ -228,9 +228,9 @@ QgsPkiConfigBundle *QgsAuthPkcs12Method::getPkiConfigBundle( const QString &auth
QgsPkiConfigBundle *bundle = nullptr;

// check if it is cached
if ( mPkiConfigBundleCache.contains( authcfg ) )
if ( sPkiConfigBundleCache.contains( authcfg ) )
{
bundle = mPkiConfigBundleCache.value( authcfg );
bundle = sPkiConfigBundleCache.value( authcfg );
if ( bundle )
{
QgsDebugMsg( QString( "Retrieved PKI bundle for authcfg %1" ).arg( authcfg ) );
@@ -286,15 +286,15 @@ void QgsAuthPkcs12Method::putPkiConfigBundle( const QString &authcfg, QgsPkiConf
{
QMutexLocker locker( &mConfigMutex );
QgsDebugMsg( QString( "Putting PKI bundle for authcfg %1" ).arg( authcfg ) );
mPkiConfigBundleCache.insert( authcfg, pkibundle );
sPkiConfigBundleCache.insert( authcfg, pkibundle );
}

void QgsAuthPkcs12Method::removePkiConfigBundle( const QString &authcfg )
{
QMutexLocker locker( &mConfigMutex );
if ( sPkiConfigBundleCache.contains( authcfg ) )
{
QgsPkiConfigBundle * pkibundle = mPkiConfigBundleCache.take( authcfg );
QgsPkiConfigBundle * pkibundle = sPkiConfigBundleCache.take( authcfg );
delete pkibundle;
pkibundle = nullptr;
QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) );

0 comments on commit 79837b0

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