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


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

The following commit has been merged in the master branch:
commit a84d470c896880f74abb720f55d1967da4c4c5a6
Author: George Goldberg <grundleborg at googlemail.com>
Date:   Sat Jun 20 17:05:33 2009 +0000

    When a new Account is created, or when setting up, we should create a new TelepathyAccount instance for it.
    
    svn path=/trunk/playground/network/telepathy-integration-daemon/; revision=984391
---
 kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp | 21 +++++++++++++++++++++
 kpeople/nepomuk-feeder/telepathyaccountmonitor.h   |  7 +++++++
 2 files changed, 28 insertions(+)

diff --git a/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp b/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
index f2551e8..d07bc33 100644
--- a/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
+++ b/kpeople/nepomuk-feeder/telepathyaccountmonitor.cpp
@@ -47,6 +47,27 @@ void TelepathyAccountMonitor::onAccountManagerReady(Tp::PendingOperation *op)
         return;
     }
 
+     // Account Manager is now ready. We should watch for any changes in the Accounts List.
+    connect(m_accountManager.data(),
+            SIGNAL(accountCreated(const QString&)),
+            SLOT(onAccountCreated(const QString&)));
+    connect(m_accountManager.data(),
+            SIGNAL(accountRemoved(const QString&)),
+            SLOT(onAccountRemoved(const QString&)));
+
+    foreach (const QString &path, m_accountManager->validAccountPaths()) {
+         onAccountCreated(path);
+     }
+}
+
+void TelepathyAccountMonitor::onAccountCreated(const QString &path)
+{
+    m_accounts.insert(path, new TelepathyAccount(path, this));
+}
+
+void TelepathyAccountMonitor::onAccountRemoved(const QString &path)
+{
+    Q_UNUSED(path);
     // TODO: Implement me!
 }
 
diff --git a/kpeople/nepomuk-feeder/telepathyaccountmonitor.h b/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
index 28f3cbc..c0e1639 100644
--- a/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
+++ b/kpeople/nepomuk-feeder/telepathyaccountmonitor.h
@@ -21,7 +21,11 @@
 #ifndef TELEPATHY_INTEGRATION_DAEMON_TELEPATHYACCOUNTMONITOR_H
 #define TELEPATHY_INTEGRATION_DAEMON_TELEPATHYACCOUNTMONITOR_H
 
+#include "telepathyaccount.h"
+
+#include <QtCore/QMap>
 #include <QtCore/QObject>
+#include <QtCore/QString>
 
 #include <TelepathyQt4/AccountManager>
 
@@ -39,9 +43,12 @@ public:
 
 private Q_SLOTS:
     void onAccountManagerReady(Tp::PendingOperation *op);
+    void onAccountCreated(const QString &path);
+    void onAccountRemoved(const QString &path);
 
 private:
     Tp::AccountManagerPtr m_accountManager;
+    QMap<QString, TelepathyAccount*> m_accounts;
 };
 
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list