[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:05:30 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=5ba2fda

The following commit has been merged in the master branch:
commit 5ba2fda9ea034dee7728db26b2768c73e56a1da8
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sun Sep 16 19:45:58 2012 +0100

    Set lastLoginFailed to false when changing password
    
    Also expose lastLoginFailed to the library
    
    REVIEW: 106386
    BUG: 306408
---
 KTp/wallet-interface.cpp | 22 ++++++++++++++++++++++
 KTp/wallet-interface.h   |  6 ++++++
 2 files changed, 28 insertions(+)

diff --git a/KTp/wallet-interface.cpp b/KTp/wallet-interface.cpp
index 89e83d7..c60899a 100644
--- a/KTp/wallet-interface.cpp
+++ b/KTp/wallet-interface.cpp
@@ -103,10 +103,32 @@ void WalletInterface::setPassword(const Tp::AccountPtr &account, const QString &
 
     d->wallet->setFolder(d->folderName);
     d->wallet->writePassword(account->uniqueIdentifier(), password);
+
+    setLastLoginFailed(account, false);
+
     //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
     d->wallet->sync();
 }
 
+void WalletInterface::setLastLoginFailed(const Tp::AccountPtr &account, bool failed)
+{
+    if (failed) {
+        setEntry(account, QLatin1String("lastLoginFailed"), QLatin1String("true"));
+    } else {
+        if (hasEntry(account, QLatin1String("lastLoginFailed"))) {
+            removeEntry(account, QLatin1String("lastLoginFailed"));
+        }
+    }
+}
+
+bool WalletInterface::lastLoginFailed(const Tp::AccountPtr &account)
+{
+    if (d->wallet.isNull()) {
+        return false;
+    }
+    return hasEntry(account, QLatin1String("lastLoginFailed"));
+}
+
 void WalletInterface::removePassword(const Tp::AccountPtr &account)
 {
     if (d->wallet.isNull() || !d->wallet->hasFolder(d->folderName)) {
diff --git a/KTp/wallet-interface.h b/KTp/wallet-interface.h
index c6281a6..e354670 100644
--- a/KTp/wallet-interface.h
+++ b/KTp/wallet-interface.h
@@ -57,6 +57,12 @@ public:
     /** Set the password for the given account to a new password */
     void setPassword(const Tp::AccountPtr &account, const QString &password);
 
+    /** Sets whether using the password failed */
+    void setLastLoginFailed(const Tp::AccountPtr &account, bool failed);
+
+    /** Returns whether using the password failed */
+    bool lastLoginFailed(const Tp::AccountPtr &account);
+
     /** Remove the password for the given account from kwallet */
     void removePassword(const Tp::AccountPtr &account);
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list