Skip to content
Permalink
Browse files

Merge pull request #8599 from m-kuhn/auth-manager-unique-ptr

Use std::unique_ptr
  • Loading branch information
m-kuhn committed Dec 4, 2018
2 parents c39e2b8 + f616450 commit 774c890f9cdf9570abb0f5ec7ee4fa24368f2828
Showing with 2 additions and 4 deletions.
  1. +1 −3 src/core/auth/qgsauthmanager.cpp
  2. +1 −1 src/core/auth/qgsauthmanager.h
@@ -175,7 +175,7 @@ bool QgsAuthManager::init( const QString &pluginPath, const QString &authDatabas
mAuthInit = true;

QgsDebugMsg( QStringLiteral( "Initializing QCA..." ) );
mQcaInitializer = new QCA::Initializer( QCA::Practical, 256 );
mQcaInitializer = qgis::make_unique<QCA::Initializer>( QCA::Practical, 256 );

QgsDebugMsg( QStringLiteral( "QCA initialized." ) );
QCA::scanForPlugins();
@@ -2974,8 +2974,6 @@ QgsAuthManager::~QgsAuthManager()
mMutex = nullptr;
delete mScheduledDbEraseTimer;
mScheduledDbEraseTimer = nullptr;
delete mQcaInitializer;
mQcaInitializer = nullptr;
QSqlDatabase::removeDatabase( QStringLiteral( "authentication.configs" ) );
}

@@ -848,7 +848,7 @@ class CORE_EXPORT QgsAuthManager : public QObject
bool mAuthInit = false;
QString mAuthDbPath;

QCA::Initializer *mQcaInitializer = nullptr;
std::unique_ptr<QCA::Initializer> mQcaInitializer;

QHash<QString, QString> mConfigAuthMethods;
QHash<QString, QgsAuthMethod *> mAuthMethods;

0 comments on commit 774c890

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