summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusintegrator.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-02-17 15:36:59 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-17 15:36:59 (GMT)
commit54b20c491f7e182f6b98f65b7e9e8e68286d6109 (patch)
tree7f17d6b2540ea226eb7d8d1b830f31f1a032316a /src/dbus/qdbusintegrator.cpp
parentdcb2678f39345b66c5303e74c156654a8d13fe83 (diff)
parent17a0a50a101fc9863d0dffd0dcb887ba68a99622 (diff)
downloadQt-54b20c491f7e182f6b98f65b7e9e8e68286d6109.zip
Qt-54b20c491f7e182f6b98f65b7e9e8e68286d6109.tar.gz
Qt-54b20c491f7e182f6b98f65b7e9e8e68286d6109.tar.bz2
Merge branch '4.6' into qt-master-from-4.6
Conflicts: mkspecs/common/symbian/symbian.conf src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tools/assistant/tools/assistant/helpviewer.cpp
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r--src/dbus/qdbusintegrator.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 44abf7b..6cb4924 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1937,7 +1937,7 @@ int QDBusConnectionPrivate::sendWithReplyAsync(const QDBusMessage &message, QObj
QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, timeout);
Q_ASSERT(pcall);
- // has it already finished (dispatched locally)?
+ // has it already finished with success (dispatched locally)?
if (pcall->replyMessage.type() == QDBusMessage::ReplyMessage) {
pcall->setReplyCallback(receiver, returnMethod);
processFinishedCall(pcall);
@@ -1945,33 +1945,24 @@ int QDBusConnectionPrivate::sendWithReplyAsync(const QDBusMessage &message, QObj
return 1;
}
+ // either it hasn't finished or it has finished with error
+ if (errorMethod) {
+ pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
+ connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod,
+ Qt::QueuedConnection);
+ pcall->watcherHelper->moveToThread(thread());
+ }
+
// has it already finished and is an error reply message?
if (pcall->replyMessage.type() == QDBusMessage::ErrorMessage) {
- if (errorMethod) {
- pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
- connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod);
- pcall->watcherHelper->moveToThread(thread());
- }
processFinishedCall(pcall);
delete pcall;
return 1;
}
- // has it already finished with error?
- if (pcall->replyMessage.type() != QDBusMessage::InvalidMessage) {
- delete pcall;
- return 0;
- }
-
pcall->autoDelete = true;
pcall->ref.ref();
-
pcall->setReplyCallback(receiver, returnMethod);
- if (errorMethod) {
- pcall->watcherHelper = new QDBusPendingCallWatcherHelper;
- connect(pcall->watcherHelper, SIGNAL(error(QDBusError,QDBusMessage)), receiver, errorMethod);
- pcall->watcherHelper->moveToThread(thread());
- }
return 1;
}