[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5
Maximiliano Curia
maxy at moszumanska.debian.org
Fri May 27 23:57:07 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=0c0197c
The following commit has been merged in the master branch:
commit 0c0197c94036f9eeb463abdad7b4ca67c5e95a13
Author: George Goldberg <grundleborg at googlemail.com>
Date: Sat Feb 14 17:10:20 2009 +0000
Add an instance of the AccountsListModel and also fix up the slot that deals with the accounts becoming ready to use the latest tpqt4 api.
svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=926103
---
src/kcm-telepathy-accounts.cpp | 18 +++++++++++++-----
src/kcm-telepathy-accounts.h | 3 +++
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/kcm-telepathy-accounts.cpp b/src/kcm-telepathy-accounts.cpp
index 596e5fb..c2eeea2 100644
--- a/src/kcm-telepathy-accounts.cpp
+++ b/src/kcm-telepathy-accounts.cpp
@@ -20,12 +20,15 @@
#include "kcm-telepathy-accounts.h"
+#include "accounts-list-model.h"
+
#include <kcategorizedsortfilterproxymodel.h>
#include <kgenericfactory.h>
#include <TelepathyQt4/Client/Account>
#include <TelepathyQt4/Client/AccountManager>
#include <TelepathyQt4/Client/PendingOperation>
+#include <TelepathyQt4/Client/PendingReadyAccount>
K_PLUGIN_FACTORY(KCMTelepathyAccountsFactory, registerPlugin<KCMTelepathyAccounts>();)
@@ -35,11 +38,13 @@ K_EXPORT_PLUGIN(KCMTelepathyAccountsFactory("telepathy_accounts", "kcm_telepathy
KCMTelepathyAccounts::KCMTelepathyAccounts(QWidget *parent, const QVariantList& args)
: KCModule(KCMTelepathyAccountsFactory::componentData(), parent, args),
m_accountsListProxyModel(0),
- m_accountManager(0)
+ m_accountManager(0),
+ m_accountsListModel(0)
{
// TODO: Implement me!
setupUi(this);
startAccountManager();
+ m_accountsListModel = new AccountsListModel(this);
}
KCMTelepathyAccounts::~KCMTelepathyAccounts()
@@ -96,17 +101,20 @@ void KCMTelepathyAccounts::onAccountReady(Telepathy::Client::PendingOperation *o
this, SLOT(onAccountReady(Telepathy::Client::PendingOperation*)));
Q_ASSERT(op->isFinished());
- if(op->isError())
+
+ Telepathy::Client::PendingReadyAccount *pra = qobject_cast<Telepathy::Client::PendingReadyAccount*>(op);
+ Q_ASSERT(0 != pra);
+
+ if(pra->isError())
{
kDebug() << "An error occurred in making and Account ready.";
+ return;
}
else
{
kDebug() << "An Account became ready successfully.";
+ // TODO: Add the account to the model.
}
-
- // TODO: Add the account to the model.
- // FIXME: Need to get the AccountManager::allAccounts() API fixed before can continue easily.
}
diff --git a/src/kcm-telepathy-accounts.h b/src/kcm-telepathy-accounts.h
index 295a2a8..f36efa1 100644
--- a/src/kcm-telepathy-accounts.h
+++ b/src/kcm-telepathy-accounts.h
@@ -25,6 +25,8 @@
#include <kcmodule.h>
+class AccountsListModel;
+
class KCategorizedSortFilterProxyModel;
namespace Telepathy {
@@ -55,6 +57,7 @@ private Q_SLOTS:
private:
KCategorizedSortFilterProxyModel *m_accountsListProxyModel;
Telepathy::Client::AccountManager *m_accountManager;
+ AccountsListModel *m_accountsListModel;
};
--
ktp-accounts-kcm packaging
More information about the pkg-kde-commits
mailing list