diff --git a/src/plugins/android/androidrunnerworker.cpp b/src/plugins/android/androidrunnerworker.cpp index 549458323cc..c5e7ece5872 100644 --- a/src/plugins/android/androidrunnerworker.cpp +++ b/src/plugins/android/androidrunnerworker.cpp @@ -508,15 +508,14 @@ static ExecutableItem preStartRecipe(const Storage &storage) storage->m_glue->addStdErr(process.cleanedStdErr().trimmed()); }; - const auto onQmlDebugSetup = [storage] { - return storage->m_qmlDebugServices == QmlDebug::NoQmlDebugServices - ? SetupResult::StopWithSuccess : SetupResult::Continue; + const auto isQmlDebug = [storage] { + return storage->m_qmlDebugServices != QmlDebug::NoQmlDebugServices; }; const auto onTaskTreeSetup = [storage](TaskTree &taskTree) { const QString port = "tcp:" + QString::number(storage->m_qmlServer.port()); taskTree.setRecipe({removeForwardPortRecipe(storage.activeStorage(), port, port, "QML")}); }; - const auto onQmlDebugDone = [storage, argsStorage] { + const auto onQmlDebugSync = [storage, argsStorage] { const QString qmljsdebugger = QString("port:%1,block,services:%2") .arg(storage->m_qmlServer.port()).arg(QmlDebug::qmlDebugServices(storage->m_qmlDebugServices)); @@ -560,10 +559,9 @@ static ExecutableItem preStartRecipe(const Storage &storage) For (iterator) >> Do { ProcessTask(onPreCommandSetup, onPreCommandDone, CallDoneIf::Error) }, - Group { - onGroupSetup(onQmlDebugSetup), + If (isQmlDebug) >> Then { TaskTreeTask(onTaskTreeSetup), - onGroupDone(onQmlDebugDone, CallDoneIf::Success) + Sync(onQmlDebugSync) }, ProcessTask(onActivitySetup, onActivityDone, CallDoneIf::Error) };