From 6734c50a9eefa51f693e3d799d7b18fba9b7da04 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 29 Dec 2014 18:12:51 -0200 Subject: [PATCH] Remove superfluous code in QDBusConnectionPrivate::sendWithReply No need to check for the local loop if that's the first thing QDBusConnectionPrivate::sendWithReplyAsync will do. The side effect is that this now allocates memory for the QDBusPendingCallPrivate object, but loopback messages aren't that common to be worth the special casing. Task-number: QTBUG-43585 Change-Id: Ic5d393bfd36e48a193fcffff13b73756ab802ba2 Reviewed-by: Albert Astals Cid Reviewed-by: Alex Blasche --- src/dbus/qdbusintegrator.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index e87ae5b29d..8cffe4d706 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1969,12 +1969,6 @@ QDBusMessage QDBusConnectionPrivate::sendWithReply(const QDBusMessage &message, { QDBusBlockingCallWatcher watcher(message); - checkThread(); - if ((sendMode == QDBus::BlockWithGui || sendMode == QDBus::Block) - && isServiceRegisteredByThread(message.service())) - // special case for synchronous local calls - return sendWithReplyLocal(message); - QDBusPendingCallPrivate *pcall = sendWithReplyAsync(message, 0, 0, 0, timeout); Q_ASSERT(pcall);