From 37c009e195e08cc4557053e98d599ec3067e2da2 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 22 Jan 2019 17:43:24 +0100 Subject: [PATCH] Android: Simplify AndroidBuildApkStep::findInBuild AndroidBuildApkStep are only ever inserted into the build step list, never the clean step list. Change-Id: I9a56bd045bf2434ac50649f3ce68209942c1ddba Reviewed-by: BogDan Vatra --- src/plugins/android/androidbuildapkstep.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/android/androidbuildapkstep.cpp b/src/plugins/android/androidbuildapkstep.cpp index 67edaaacb9b..f14d3d2416e 100644 --- a/src/plugins/android/androidbuildapkstep.cpp +++ b/src/plugins/android/androidbuildapkstep.cpp @@ -138,11 +138,9 @@ AndroidBuildApkStep *AndroidBuildApkStep::findInBuild(const BuildConfiguration * { if (!bc) return nullptr; - for (const Core::Id &id : bc->knownStepLists()) { - if (auto step = bc->stepList(id)->firstOfType()) - return step; - } - return nullptr; + BuildStepList *bsl = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD); + QTC_ASSERT(bsl, return nullptr); + return bsl->firstOfType(); } bool AndroidBuildApkStep::init()