summaryrefslogtreecommitdiff
path: root/TelepathyQt4/pending-account.cpp
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2010-11-11 18:19:15 -0200
committerAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2010-11-11 20:27:41 -0200
commita3465749b60ba54a116d97affb25e1b2dc1c104a (patch)
treea9d222354401955685378ceb34c8f841261668d5 /TelepathyQt4/pending-account.cpp
parent993e0f9fc501a2bd644b6056da52693658156c0b (diff)
PendingReady: Add a new proxy() method and make object() return the factory when using a factory.
Diffstat (limited to 'TelepathyQt4/pending-account.cpp')
-rw-r--r--TelepathyQt4/pending-account.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/TelepathyQt4/pending-account.cpp b/TelepathyQt4/pending-account.cpp
index cfff97e7..ac6ddb74 100644
--- a/TelepathyQt4/pending-account.cpp
+++ b/TelepathyQt4/pending-account.cpp
@@ -149,11 +149,11 @@ void PendingAccount::onCallFinished(QDBusPendingCallWatcher *watcher)
mPriv->objectPath = reply.value();
debug() << "Got reply to AccountManager.CreateAccount - object path:" <<
mPriv->objectPath.path();
- PendingReady *proxyOp = manager()->accountFactory()->proxy(manager()->busName(),
+ PendingReady *readyOp = manager()->accountFactory()->proxy(manager()->busName(),
mPriv->objectPath.path(), manager()->connectionFactory(),
manager()->channelFactory(), manager()->contactFactory());
- mPriv->account = AccountPtr(qobject_cast<Account*>((Account*) proxyOp->object().data()));
- connect(proxyOp,
+ mPriv->account = AccountPtr::qObjectCast(readyOp->proxy());
+ connect(readyOp,
SIGNAL(finished(Tp::PendingOperation*)),
SLOT(onAccountBuilt(Tp::PendingOperation*)));
} else {