From 49479aa32aea4bb8263d990b4dc0870dd9d4047b Mon Sep 17 00:00:00 2001 From: Frank Osterfeld Date: Sun, 13 Oct 2013 15:50:00 +0200 Subject: [PATCH] Replace obsolete auto_ptr by QScopedPointer --- keychain_dbus.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keychain_dbus.cpp b/keychain_dbus.cpp index eed1596..f415cd2 100644 --- a/keychain_dbus.cpp +++ b/keychain_dbus.cpp @@ -10,7 +10,7 @@ #include -#include +#include using namespace QKeychain; @@ -249,8 +249,8 @@ void ReadPasswordJobPrivate::gnomeKeyring_cb( int result, const char* string, Re void ReadPasswordJobPrivate::fallbackOnError(const QDBusError& err ) { - std::auto_ptr local( !q->settings() ? new QSettings( q->service() ) : 0 ); - QSettings* actual = q->settings() ? q->settings() : local.get(); + QScopedPointer local( !q->settings() ? new QSettings( q->service() ) : 0 ); + QSettings* actual = q->settings() ? q->settings() : local.data(); WritePasswordJobPrivate::Mode mode; if ( q->insecureFallback() && actual->contains( dataKey( key ) ) ) { @@ -271,8 +271,8 @@ void ReadPasswordJobPrivate::kwalletOpenFinished( QDBusPendingCallWatcher* watch watcher->deleteLater(); const QDBusPendingReply reply = *watcher; - std::auto_ptr local( !q->settings() ? new QSettings( q->service() ) : 0 ); - QSettings* actual = q->settings() ? q->settings() : local.get(); + QScopedPointer local( !q->settings() ? new QSettings( q->service() ) : 0 ); + QSettings* actual = q->settings() ? q->settings() : local.data(); WritePasswordJobPrivate::Mode mode; if ( reply.isError() ) { @@ -419,8 +419,8 @@ void WritePasswordJobPrivate::scheduledStart() { void WritePasswordJobPrivate::fallbackOnError(const QDBusError &err) { - std::auto_ptr local( !q->settings() ? new QSettings( q->service() ) : 0 ); - QSettings* actual = q->settings() ? q->settings() : local.get(); + QScopedPointer local( !q->settings() ? new QSettings( q->service() ) : 0 ); + QSettings* actual = q->settings() ? q->settings() : local.data(); if ( !q->insecureFallback() ) { q->emitFinishedWithError( OtherError, tr("Could not open wallet: %1; %2").arg( QDBusError::errorString( err.type() ), err.message() ) ); @@ -459,8 +459,8 @@ void WritePasswordJobPrivate::kwalletOpenFinished( QDBusPendingCallWatcher* watc watcher->deleteLater(); QDBusPendingReply reply = *watcher; - std::auto_ptr local( !q->settings() ? new QSettings( q->service() ) : 0 ); - QSettings* actual = q->settings() ? q->settings() : local.get(); + QScopedPointer local( !q->settings() ? new QSettings( q->service() ) : 0 ); + QSettings* actual = q->settings() ? q->settings() : local.data(); if ( reply.isError() ) { fallbackOnError( reply.error() );