[telepathy-qt4/master] PendingChannelRequest: Make sure channelRequestCreated is emitted before finished.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Fri Jun 12 08:31:59 PDT 2009


---
 TelepathyQt4/pending-channel-request.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/TelepathyQt4/pending-channel-request.cpp b/TelepathyQt4/pending-channel-request.cpp
index b625a41..d3eb6e4 100644
--- a/TelepathyQt4/pending-channel-request.cpp
+++ b/TelepathyQt4/pending-channel-request.cpp
@@ -186,6 +186,8 @@ void PendingChannelRequest::onWatcherFinished(QDBusPendingCallWatcher *watcher)
             setFinishedWithError(TELEPATHY_ERROR_CANCELLED,
                     "ChannelRequest cancelled");
         } else {
+            emit channelRequestCreated(mPriv->channelRequest);
+
             connect(mPriv->channelRequest.data(),
                     SIGNAL(failed(const QString &, const QString &)),
                     SLOT(setFinishedWithError(const QString &, const QString &)));
@@ -196,8 +198,6 @@ void PendingChannelRequest::onWatcherFinished(QDBusPendingCallWatcher *watcher)
             connect(mPriv->channelRequest->proceed(),
                     SIGNAL(finished(Tp::PendingOperation*)),
                     SLOT(onProceedOperationFinished(Tp::PendingOperation*)));
-
-            emit channelRequestCreated(mPriv->channelRequest);
         }
     } else {
         debug().nospace() << "Ensure/CreateChannel failed:" <<
-- 
1.5.6.5




More information about the telepathy-commits mailing list