Skip to content

Commit

Permalink
[auth] Change static members prefix from 'm' to 's' as per coding sta…
Browse files Browse the repository at this point in the history
…ndards
  • Loading branch information
elpaso committed Oct 11, 2017
1 parent ee89bf5 commit 79837b0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions src/auth/basic/qgsauthbasicmethod.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
static const QString AUTH_METHOD_KEY = "Basic"; static const QString AUTH_METHOD_KEY = "Basic";
static const QString AUTH_METHOD_DESCRIPTION = "Basic authentication"; 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() QgsAuthBasicMethod::QgsAuthBasicMethod()
Expand Down Expand Up @@ -156,9 +156,9 @@ QgsAuthMethodConfig QgsAuthBasicMethod::getMethodConfig( const QString &authcfg,
QgsAuthMethodConfig mconfig; QgsAuthMethodConfig mconfig;


// check if it is cached // 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 ) ); QgsDebugMsg( QString( "Retrieved config for authcfg: %1" ).arg( authcfg ) );
return mconfig; return mconfig;
} }
Expand All @@ -181,15 +181,15 @@ void QgsAuthBasicMethod::putMethodConfig( const QString &authcfg, const QgsAuthM
{ {
QMutexLocker locker( &mConfigMutex ); QMutexLocker locker( &mConfigMutex );
QgsDebugMsg( QString( "Putting basic config for authcfg: %1" ).arg( authcfg ) ); QgsDebugMsg( QString( "Putting basic config for authcfg: %1" ).arg( authcfg ) );
mAuthConfigCache.insert( authcfg, mconfig ); sAuthConfigCache.insert( authcfg, mconfig );
} }


void QgsAuthBasicMethod::removeMethodConfig( const QString &authcfg ) void QgsAuthBasicMethod::removeMethodConfig( const QString &authcfg )
{ {
QMutexLocker locker( &mConfigMutex ); QMutexLocker locker( &mConfigMutex );
if ( sAuthConfigCache.contains( authcfg ) ) if ( sAuthConfigCache.contains( authcfg ) )
{ {
mAuthConfigCache.remove( authcfg ); sAuthConfigCache.remove( authcfg );
QgsDebugMsg( QString( "Removed basic config for authcfg: %1" ).arg( authcfg ) ); QgsDebugMsg( QString( "Removed basic config for authcfg: %1" ).arg( authcfg ) );
} }
} }
Expand Down
10 changes: 5 additions & 5 deletions src/auth/identcert/qgsauthidentcertmethod.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
static const QString AUTH_METHOD_KEY = "Identity-Cert"; static const QString AUTH_METHOD_KEY = "Identity-Cert";
static const QString AUTH_METHOD_DESCRIPTION = "Identity certificate authentication"; 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() QgsAuthIdentCertMethod::QgsAuthIdentCertMethod()
Expand Down Expand Up @@ -226,9 +226,9 @@ QgsPkiConfigBundle *QgsAuthIdentCertMethod::getPkiConfigBundle( const QString &a
QgsPkiConfigBundle *bundle = nullptr; QgsPkiConfigBundle *bundle = nullptr;


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


void QgsAuthIdentCertMethod::removePkiConfigBundle( const QString &authcfg ) void QgsAuthIdentCertMethod::removePkiConfigBundle( const QString &authcfg )
{ {
QMutexLocker locker( &mConfigMutex ); QMutexLocker locker( &mConfigMutex );
if ( sPkiConfigBundleCache.contains( authcfg ) ) if ( sPkiConfigBundleCache.contains( authcfg ) )
{ {
QgsPkiConfigBundle * pkibundle = mPkiConfigBundleCache.take( authcfg ); QgsPkiConfigBundle * pkibundle = sPkiConfigBundleCache.take( authcfg );
delete pkibundle; delete pkibundle;
pkibundle = nullptr; pkibundle = nullptr;
QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) ); QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) );
Expand Down
10 changes: 5 additions & 5 deletions src/auth/pkipaths/qgsauthpkipathsmethod.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
static const QString AUTH_METHOD_KEY = "PKI-Paths"; static const QString AUTH_METHOD_KEY = "PKI-Paths";
static const QString AUTH_METHOD_DESCRIPTION = "PKI paths authentication"; 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() QgsAuthPkiPathsMethod::QgsAuthPkiPathsMethod()
Expand Down Expand Up @@ -230,9 +230,9 @@ QgsPkiConfigBundle *QgsAuthPkiPathsMethod::getPkiConfigBundle( const QString &au
QgsPkiConfigBundle *bundle = nullptr; QgsPkiConfigBundle *bundle = nullptr;


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


void QgsAuthPkiPathsMethod::removePkiConfigBundle( const QString &authcfg ) void QgsAuthPkiPathsMethod::removePkiConfigBundle( const QString &authcfg )
{ {
QMutexLocker locker( &mConfigMutex ); QMutexLocker locker( &mConfigMutex );
if ( sPkiConfigBundleCache.contains( authcfg ) ) if ( sPkiConfigBundleCache.contains( authcfg ) )
{ {
QgsPkiConfigBundle * pkibundle = mPkiConfigBundleCache.take( authcfg ); QgsPkiConfigBundle * pkibundle = sPkiConfigBundleCache.take( authcfg );
delete pkibundle; delete pkibundle;
pkibundle = nullptr; pkibundle = nullptr;
QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) ); QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) );
Expand Down
10 changes: 5 additions & 5 deletions src/auth/pkipkcs12/qgsauthpkcs12method.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
static const QString AUTH_METHOD_KEY = "PKI-PKCS#12"; static const QString AUTH_METHOD_KEY = "PKI-PKCS#12";
static const QString AUTH_METHOD_DESCRIPTION = "PKI PKCS#12 authentication"; 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() QgsAuthPkcs12Method::QgsAuthPkcs12Method()
Expand Down Expand Up @@ -228,9 +228,9 @@ QgsPkiConfigBundle *QgsAuthPkcs12Method::getPkiConfigBundle( const QString &auth
QgsPkiConfigBundle *bundle = nullptr; QgsPkiConfigBundle *bundle = nullptr;


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


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

0 comments on commit 79837b0

Please sign in to comment.