summaryrefslogtreecommitdiffstats
path: root/src/dbus
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-17 21:55:18 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-17 21:55:18 (GMT)
commit9eacc56619ce471a9777f88c89f64ca95cd6ae63 (patch)
treeb52b46a26a04889145a30339da28e5aa99756b1c /src/dbus
parentfd3f9dd0f31efeea3aa0ec28b54c70d85712c7ba (diff)
parent54b20c491f7e182f6b98f65b7e9e8e68286d6109 (diff)
downloadQt-9eacc56619ce471a9777f88c89f64ca95cd6ae63.zip
Qt-9eacc56619ce471a9777f88c89f64ca95cd6ae63.tar.gz
Qt-9eacc56619ce471a9777f88c89f64ca95cd6ae63.tar.bz2
Merge branch 'qt-master-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (249 commits) Fixed autotest failure in tst_QGraphicsScene::render on Maemo. Changed function names in audio input example to clarify meaning Tidied up debug output in audio input example Removed redundant strings from audio input example Cleaned up memory management in audio input example Changed variable names in audio input example to match Qt code style Made level calculation in audio input example work for all formats Removed unused variable from audio input example Update suspend/resume button label in audio input example Changed function names in audio output example to clarify meaning Cleaned up implementation of audio output example Tidied up debug output in audio output example Removed redundant strings from audio output example Cleaned up memory management in audio output example Changed variable names in audio output example to match Qt code style Made data generation in audio output example work for all formats Update suspend/resume button label in audio output example Added missing override in audio output example QLocalSocket::isValid on Windows must check for broken connection Fix an issue with the error signal in a callWithCallback not being ...
Diffstat (limited to 'src/dbus')
-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;
}