[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:06:49 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=48c8e67
The following commit has been merged in the master branch:
commit 48c8e677cdc45479e604f76b99166e16b8ee4d37
Author: Aleix Pol <aleixpol at kde.org>
Date: Sun May 5 17:50:58 2013 +0200
Make it possible to unregister a client
This helps because otherwise we get crashes when closing the plasmoid. The
TelepathyManager would try to delete the object after QDeclarative has
done so.
Reviewed by David Edmundson
---
KTp/Declarative/telepathy-manager.cpp | 6 ++++++
KTp/Declarative/telepathy-manager.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/KTp/Declarative/telepathy-manager.cpp b/KTp/Declarative/telepathy-manager.cpp
index 79f47b3..d8e1221 100644
--- a/KTp/Declarative/telepathy-manager.cpp
+++ b/KTp/Declarative/telepathy-manager.cpp
@@ -76,6 +76,12 @@ bool TelepathyManager::registerClient(QObject *client, const QString &name)
return m_clientRegistrar->registerClient(Tp::AbstractClientPtr(abstractClient), name);
}
+bool TelepathyManager::unregisterClient(QObject* client)
+{
+ Tp::AbstractClient* abstractClient = dynamic_cast<Tp::AbstractClient*>(client);
+ return abstractClient && m_clientRegistrar && m_clientRegistrar->unregisterClient(Tp::AbstractClientPtr(abstractClient));
+}
+
void TelepathyManager::addTextChatFeatures()
{
m_connectionFactory->addFeatures(Tp::Features() << Tp::Connection::FeatureSelfContact);
diff --git a/KTp/Declarative/telepathy-manager.h b/KTp/Declarative/telepathy-manager.h
index 492f09c..d229fdf 100644
--- a/KTp/Declarative/telepathy-manager.h
+++ b/KTp/Declarative/telepathy-manager.h
@@ -77,6 +77,8 @@ public:
*/
Q_INVOKABLE bool registerClient(QObject *client, const QString &clientName);
+ Q_INVOKABLE bool unregisterClient(QObject* client);
+
public Q_SLOTS:
/** Start a text chat using the default KTp text application
@arg account the account to start the channel from
--
ktp-common-internals packaging
More information about the pkg-kde-commits
mailing list