[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9
Maximiliano Curia
maxy at moszumanska.debian.org
Mon May 9 09:04:37 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=3007da4
The following commit has been merged in the master branch:
commit 3007da400f9ac4007dcbac00a41bd683f276ef4b
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Tue Oct 4 11:09:31 2011 +0100
Added review comments
REVIEW: 102741
BUG: 282197
---
wallet-interface.cpp | 18 +++++++++++++++++-
wallet-interface.h | 4 ++++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/wallet-interface.cpp b/wallet-interface.cpp
index 9be45fc..70ff92c 100644
--- a/wallet-interface.cpp
+++ b/wallet-interface.cpp
@@ -23,7 +23,7 @@
#include <KDebug>
-const QLatin1String WalletInterface::s_folderName = QLatin1String("kde-telepathy");
+const QLatin1String WalletInterface::s_folderName = QLatin1String("telepathy-kde");
WalletInterface::WalletInterface(WId winId):
@@ -82,4 +82,20 @@ void WalletInterface::setPassword(const Tp::AccountPtr &account, const QString &
m_wallet->setFolder(s_folderName);
m_wallet->writePassword(account->uniqueIdentifier(), password);
+ //sync normally happens on close, but in this case we need it to happen /now/ as it needs to be synced before the auth-client starts
+ m_wallet->sync();
+}
+
+void WalletInterface::removePassword(const Tp::AccountPtr &account)
+{
+ if (m_wallet.isNull()) {
+ return;
+ }
+
+ if (! m_wallet->hasFolder(s_folderName)) {
+ return;
+ }
+
+ m_wallet->setFolder(s_folderName);
+ m_wallet->removeEntry(account->uniqueIdentifier());
}
diff --git a/wallet-interface.h b/wallet-interface.h
index 4807a03..f5b0cf6 100644
--- a/wallet-interface.h
+++ b/wallet-interface.h
@@ -42,6 +42,10 @@ public:
/** Set the password entry for the given account to a new password*/
void setPassword(const Tp::AccountPtr &account, const QString &password);
+
+ /** Remove the entry from kwallet*/
+ void removePassword(const Tp::AccountPtr &account);
+
private:
static const QLatin1String s_folderName;
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list