Skip to content
Permalink
Browse files

Use std::unique_ptr

  • Loading branch information
m-kuhn committed Dec 4, 2018
1 parent cafa652 commit f6164509e5eae4d68d636f72862e9e7b2f7c4e75
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 f616450

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