[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim-runtime/KDE/4.13] resources/pop3: Remove password from kwallet when we remove resources
From:       Montel Laurent <montel () kde ! org>
Date:       2014-04-15 11:29:42
Message-ID: E1Wa1Yc-0004rw-Kh () scm ! kde ! org
[Download RAW message or body]

Git commit 2201acd6d4a582f00678cd210e96ac2858327f44 by Montel Laurent.
Committed on 15/04/2014 at 11:27.
Pushed by mlaurent into branch 'KDE/4.13'.

Remove password from kwallet when we remove resources

M  +10   -1    resources/pop3/pop3resource.cpp
M  +3    -0    resources/pop3/pop3resource.h

http://commits.kde.org/kdepim-runtime/2201acd6d4a582f00678cd210e96ac2858327=
f44

diff --git a/resources/pop3/pop3resource.cpp b/resources/pop3/pop3resource.=
cpp
index 5d36669..4a1bd43 100644
--- a/resources/pop3/pop3resource.cpp
+++ b/resources/pop3/pop3resource.cpp
@@ -1008,7 +1008,16 @@ void POP3Resource::retrieveCollections()
 =

 void POP3Resource::clearCachedPassword()
 {
-  mPassword.clear();
+    mPassword.clear();
+}
+
+void POP3Resource::cleanup()
+{
+  if (mWallet && mWallet->isOpen() && mWallet->hasFolder( QLatin1String("p=
op3") ) ) {
+    mWallet->setFolder( QLatin1String("pop3") );
+    if ( mWallet->hasEntry( identifier() ) )
+        mWallet->removeEntry(identifier());
+    }
 }
 =

 void POP3Resource::doSetOnline( bool online )
diff --git a/resources/pop3/pop3resource.h b/resources/pop3/pop3resource.h
index 94f609c..f228c9c 100644
--- a/resources/pop3/pop3resource.h
+++ b/resources/pop3/pop3resource.h
@@ -44,6 +44,8 @@ class POP3Resource : public Akonadi::ResourceBase,
 =

     void clearCachedPassword();
 =

+    void cleanup();
+
   public Q_SLOTS:
     virtual void configure( WId windowId );
 =

@@ -180,6 +182,7 @@ class POP3Resource : public Akonadi::ResourceBase,
 =

     // List of message IDs that were successfully deleted
     QList<int> mDeletedIDs;
+
 };
 =

 #endif

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic