[telepathy-qt4/master] PendingConnection: Hold a weak ref to connection manager.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Tue Mar 31 15:34:53 PDT 2009
---
TelepathyQt4/Client/pending-connection.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/TelepathyQt4/Client/pending-connection.cpp b/TelepathyQt4/Client/pending-connection.cpp
index 203356a..132a0db 100644
--- a/TelepathyQt4/Client/pending-connection.cpp
+++ b/TelepathyQt4/Client/pending-connection.cpp
@@ -55,7 +55,7 @@ struct PendingConnection::Private
{
}
- ConnectionManagerPtr manager;
+ WeakPtr<ConnectionManager> manager;
ConnectionPtr connection;
QString busName;
QDBusObjectPath objectPath;
@@ -125,7 +125,8 @@ ConnectionPtr PendingConnection::connection() const
}
if (!mPriv->connection) {
- mPriv->connection = Connection::create(mPriv->manager->dbusConnection(),
+ ConnectionManagerPtr manager(mPriv->manager);
+ mPriv->connection = Connection::create(manager->dbusConnection(),
mPriv->busName, mPriv->objectPath.path());
}
--
1.5.6.5
More information about the telepathy-commits
mailing list