[Telepathy-commits] [telepathy-qt4/master] Don't make Connection the QObject parent of the Contacts

Olli Salli olli.salli at collabora.co.uk
Wed Jan 28 23:22:43 PST 2009


Because Contacts are usually referred to by QSharedPointers, it would be
somewhat tedious for users to guarantee that there are none lying around
after the Connection is deleted.
---
 TelepathyQt4/Client/contact.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/TelepathyQt4/Client/contact.cpp b/TelepathyQt4/Client/contact.cpp
index 1e7956e..795c695 100644
--- a/TelepathyQt4/Client/contact.cpp
+++ b/TelepathyQt4/Client/contact.cpp
@@ -66,7 +66,7 @@ Contact::~Contact()
 
 Contact::Contact(Connection *connection, const ReferencedHandles &handle,
         const QVariantMap &attributes)
-    : QObject(connection), mPriv(new Private(connection, handle))
+    : QObject(0), mPriv(new Private(connection, handle))
 {
     debug() << this << "initialized with" << attributes.size() << "attributes";
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list