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


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

The following commit has been merged in the master branch:
commit 5f682455df7091489db8c56e45f4374443ff2523
Author: George Goldberg <grundleborg at googlemail.com>
Date:   Mon Aug 3 13:19:27 2009 +0000

    When the Edit button is clicked, display the EditAccountDialog.
    
    svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=1006317
---
 KTp/Models/accounts-list-model.cpp | 19 +++++++++++++++++++
 KTp/Models/accounts-list-model.h   |  1 +
 2 files changed, 20 insertions(+)

diff --git a/KTp/Models/accounts-list-model.cpp b/KTp/Models/accounts-list-model.cpp
index 1b37825..9641330 100644
--- a/KTp/Models/accounts-list-model.cpp
+++ b/KTp/Models/accounts-list-model.cpp
@@ -140,6 +140,25 @@ void AccountsListModel::addAccount(const Tp::AccountPtr &account)
    }
 }
 
+void AccountsListModel::editAccount(const QModelIndex &index)
+{
+    kDebug();
+
+    if(!index.isValid()) {
+        kWarning() << "Can't edit Account: Invalid index.";
+        return;
+    }
+
+    AccountItem *accountItem = m_readyAccounts.at(index.row());
+
+    if (!accountItem) {
+        kWarning() << "Account item is null.";
+        return;
+    }
+
+    accountItem->edit();
+}
+
 void AccountsListModel::removeAccount(const QModelIndex &index)
 {
     kDebug();
diff --git a/KTp/Models/accounts-list-model.h b/KTp/Models/accounts-list-model.h
index 6922833..6beefea 100644
--- a/KTp/Models/accounts-list-model.h
+++ b/KTp/Models/accounts-list-model.h
@@ -40,6 +40,7 @@ public:
     virtual Qt::ItemFlags flags(const QModelIndex &index) const;
     virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
     void addAccount(const Tp::AccountPtr &account);
+    void editAccount(const QModelIndex &index);
     void removeAccount(const QModelIndex &index);
 
 private Q_SLOTS:

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list