[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:02:10 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=67c489d

The following commit has been merged in the master branch:
commit 67c489d5c8e13ba64bd5afc5541c20a5ed987193
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Tue May 15 13:43:42 2012 +0100

    Update to new wallet interface
    
    Reviewed-by: Martin Klapetek
---
 src/add-account-assistant.cpp  |  3 +--
 src/edit-account-dialog.cpp    | 10 ++++------
 src/kcm-telepathy-accounts.cpp |  4 +---
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/add-account-assistant.cpp b/src/add-account-assistant.cpp
index e15901b..880b423 100644
--- a/src/add-account-assistant.cpp
+++ b/src/add-account-assistant.cpp
@@ -279,8 +279,7 @@ void AddAccountAssistant::onAccountCreated(Tp::PendingOperation *op)
     //save password to KWallet if needed
     QVariantMap values  = d->accountEditWidget->parametersSet();
     if (values.contains(QLatin1String("password"))) {
-        KTp::WalletInterface wallet(this->effectiveWinId());
-        wallet.setPassword(account, values[QLatin1String("password")].toString());
+        KTp::WalletInterface::setPassword(account, values[QLatin1String("password")].toString());
     }
 
     if (d->accountEditWidget->connectOnAdd()) {
diff --git a/src/edit-account-dialog.cpp b/src/edit-account-dialog.cpp
index 37cb28f..91eeccf 100644
--- a/src/edit-account-dialog.cpp
+++ b/src/edit-account-dialog.cpp
@@ -71,10 +71,9 @@ EditAccountDialog::EditAccountDialog(AccountItem *item, QWidget *parent)
     //update the parameter model with the password from kwallet (if applicable)
     Tp::ProtocolParameter passwordParameter = parameterModel->parameter(QLatin1String("password"));
 
-    KTp::WalletInterface wallet(this->effectiveWinId());
-    if (passwordParameter.isValid() && wallet.hasPassword(d->item->account())) {
+    if (passwordParameter.isValid() && KTp::WalletInterface::hasPassword(d->item->account())) {
         QModelIndex index = parameterModel->indexForParameter(passwordParameter);
-        QString password = wallet.password(d->item->account());
+        QString password = KTp::WalletInterface::password(d->item->account());
         parameterModel->setData(index, password, Qt::EditRole);
     }
 
@@ -139,11 +138,10 @@ void EditAccountDialog::onParametersUpdated(Tp::PendingOperation *op)
 
     QVariantMap values = d->widget->parametersSet();
 
-    KTp::WalletInterface wallet(this->effectiveWinId());
     if (values.contains(QLatin1String("password"))) {
-        wallet.setPassword(d->item->account(), values[QLatin1String("password")].toString());
+        KTp::WalletInterface::setPassword(d->item->account(), values[QLatin1String("password")].toString());
     } else {
-        wallet.removePassword(d->item->account());
+        KTp::WalletInterface::removePassword(d->item->account());
     }
 
 
diff --git a/src/kcm-telepathy-accounts.cpp b/src/kcm-telepathy-accounts.cpp
index b588137..8c81a0e 100644
--- a/src/kcm-telepathy-accounts.cpp
+++ b/src/kcm-telepathy-accounts.cpp
@@ -341,9 +341,7 @@ void KCMTelepathyAccounts::onRemoveAccountClicked()
                                         QString(), KMessageBox::Notify | KMessageBox::Dangerous) == KMessageBox::Continue)
     {
         AccountItem *item = index.data(AccountsListModel::AccountItemRole).value<AccountItem*>();
-        KTp::WalletInterface wallet(this->effectiveWinId());
-        wallet.removeAccount(item->account());
-
+        KTp::WalletInterface::removeAccount(item->account());
         m_accountsListModel->removeAccount(m_currentModel->mapToSource(index));
     }
 }

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list