From cfea6ec6f8aebb81a1eae353ff11045cd91652cf Mon Sep 17 00:00:00 2001 From: Simo Piiroinen Date: Fri, 31 Aug 2018 12:42:16 +0300 Subject: [PATCH] [usb-moded-qt5] Ignore reply to com.meego.usb_moded.set_mode() method call. JB#42756 The set_mode() method call merely initiates mode transition, and a separate signal will be broadcast when/if it finishes. Ignore set_mode() reply value, but leave the pending call handler in place as it still has use from debugging point of view. Signed-off-by: Simo Piiroinen --- src/qusbmoded.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qusbmoded.cpp b/src/qusbmoded.cpp index 29c466d..69d9ef8 100644 --- a/src/qusbmoded.cpp +++ b/src/qusbmoded.cpp @@ -398,10 +398,10 @@ void QUsbModed::onSetModeFinished(QDBusPendingCallWatcher* aCall) if (!reply.isError()) { QString mode = reply.value(); DEBUG_(mode); - if (iPrivate->iCurrentMode != mode) { - iPrivate->iCurrentMode = mode; - Q_EMIT currentModeChanged(); - } + // Note: Getting a reply does not indicate mode change. + // Even accepted requests could get translated to + // something else (e.g. charging only) if there + // are problems during mode activation } else { DEBUG_(reply.error()); }