[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:34 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=ae0619b
The following commit has been merged in the master branch:
commit ae0619b45e55f6659ebfeb0c28a23b8d6d6b31a8
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Fri Sep 28 20:47:55 2012 +0100
Address review comments
REVIEW: 106404
---
KTp/global-contact-manager.cpp | 44 +++++++++++++++++++++++++++---------------
KTp/global-contact-manager.h | 26 +++++++++++++++++++++----
2 files changed, 50 insertions(+), 20 deletions(-)
diff --git a/KTp/global-contact-manager.cpp b/KTp/global-contact-manager.cpp
index e4715ff..57de505 100644
--- a/KTp/global-contact-manager.cpp
+++ b/KTp/global-contact-manager.cpp
@@ -1,3 +1,23 @@
+/*
+ * This file is part of telepathy-common-internals
+ *
+ * Copyright (C) 2012 David Edmundson <kde at davidedmundson.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#include "global-contact-manager.h"
#include <TelepathyQt/AccountManager>
@@ -8,10 +28,12 @@
using namespace KTp;
+namespace KTp {
class GlobalContactManagerPrivate {
public:
Tp::AccountManagerPtr accountManager;
};
+}
AccountContact::AccountContact(const Tp::AccountPtr &account, const Tp::ContactPtr &contact)
{
@@ -30,30 +52,15 @@ Tp::ContactPtr AccountContact::contact() const
}
-GlobalContactManager::GlobalContactManager(QObject *parent) :
+GlobalContactManager::GlobalContactManager(const Tp::AccountManagerPtr &accountManager, QObject *parent) :
QObject(parent),
d(new GlobalContactManagerPrivate())
{
-}
-
-GlobalContactManager::~GlobalContactManager()
-{
- delete d;
-}
-
-
-void GlobalContactManager::setAccountManager(const Tp::AccountManagerPtr &accountManager)
-{
if (! d->accountManager.isNull()) {
kWarning() << "account manager already set";
return;
}
- if (!accountManager->isReady()) {
- kWarning() << "account manager not ready";
- return;
- }
-
d->accountManager = accountManager;
Q_FOREACH(const Tp::AccountPtr &account, accountManager->allAccounts()) {
@@ -62,6 +69,11 @@ void GlobalContactManager::setAccountManager(const Tp::AccountManagerPtr &accoun
connect(accountManager.data(), SIGNAL(newAccount(Tp::AccountPtr)), SLOT(onNewAccount(Tp::AccountPtr)));
}
+GlobalContactManager::~GlobalContactManager()
+{
+ delete d;
+}
+
AccountContactList GlobalContactManager::allKnownContacts()
{
AccountContactList allContacts;
diff --git a/KTp/global-contact-manager.h b/KTp/global-contact-manager.h
index 63bc7b5..21394ee 100644
--- a/KTp/global-contact-manager.h
+++ b/KTp/global-contact-manager.h
@@ -1,3 +1,23 @@
+/*
+ * This file is part of telepathy-common-internals
+ *
+ * Copyright (C) 2012 David Edmundson <kde at davidedmundson.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#ifndef GLOBALCONTACTMANAGER_H
#define GLOBALCONTACTMANAGER_H
@@ -28,10 +48,8 @@ class KTP_EXPORT GlobalContactManager : public QObject
{
Q_OBJECT
public:
- explicit GlobalContactManager(QObject *parent = 0);
+ explicit GlobalContactManager(const Tp::AccountManagerPtr &accountManager, QObject *parent = 0);
virtual ~GlobalContactManager();
-
- void setAccountManager(const Tp::AccountManagerPtr &accountManager);
AccountContactList allKnownContacts();
@@ -44,7 +62,7 @@ private Q_SLOTS:
void onConnectionChanged(const Tp::ConnectionPtr &connection);
void onContactManagerStateChanged(Tp::ContactListState state);
void onAllKnownContactsChanged (const Tp::Contacts &contactsAdded, const Tp::Contacts &contactsRemoved, const Tp::Channel::GroupMemberChangeDetails &details);
-
+
private:
void onContactManagerStateChanged(const Tp::ContactManagerPtr &contactManager, Tp::ContactListState state);
void onAllKnownContactsChanged (const Tp::ContactManagerPtr &contactManager, const Tp::Contacts &contactsAdded, const Tp::Contacts &contactsRemoved, const Tp::Channel::GroupMemberChangeDetails &details);
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list