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


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

The following commit has been merged in the master branch:
commit f60c9cb659d3badd21668c99d7c65c6ea4e3564b
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Tue May 28 23:40:15 2013 +0100

    Claim cpp ownership of all handlers being registered by TelepathyManager
---
 KTp/Declarative/telepathy-manager.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/KTp/Declarative/telepathy-manager.cpp b/KTp/Declarative/telepathy-manager.cpp
index d8e1221..940dc62 100644
--- a/KTp/Declarative/telepathy-manager.cpp
+++ b/KTp/Declarative/telepathy-manager.cpp
@@ -21,12 +21,13 @@
 #include <KTp/actions.h>
 
 #include <TelepathyQt/Account>
-
 #include <TelepathyQt/AccountManager>
 #include <TelepathyQt/ClientRegistrar>
 #include <TelepathyQt/AbstractClient>
 #include <TelepathyQt/TextChannel>
 
+#include <QDeclarativeEngine>
+
 TelepathyManager::TelepathyManager(QObject *parent)
     : QObject(parent)
 {
@@ -73,6 +74,9 @@ bool TelepathyManager::registerClient(QObject *client, const QString &name)
         m_clientRegistrar = Tp::ClientRegistrar::create(m_accountManager);
     }
 
+    //the client registrar will delete the handler when the registrar is deleted.
+    QDeclarativeEngine::setObjectOwnership(client, QDeclarativeEngine::CppOwnership);
+
     return m_clientRegistrar->registerClient(Tp::AbstractClientPtr(abstractClient), name);
 }
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list