Android: Fix signing of apks

The call of stepList() in AndroidDeployQtStep::init() returns a list of
only one deploy step which is not even of the desired type
AndroidBuildApkStep.

Use buildConfiguration()->buildSteps() to get the build steps.

Amends: 995f96f999

Fixes: QTCREATORBUG-33077
Change-Id: I412e169dd5b620f9e72683f8a5c830baf2630bb7
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2025-06-17 17:31:20 +02:00
parent ef02bd8ea9
commit e0e64565ad

View File

@@ -293,7 +293,8 @@ bool AndroidDeployQtStep::init()
if (buildType() == BuildConfiguration::Release)
m_androiddeployqtArgs.addArgs({"--release"});
auto androidBuildApkStep = stepList()->firstOfType<AndroidBuildApkStep>();
const auto androidBuildApkStep =
buildConfiguration()->buildSteps()->firstOfType<AndroidBuildApkStep>();
if (androidBuildApkStep && androidBuildApkStep->signPackage()) {
// The androiddeployqt tool is not really written to do stand-alone installations.
// This hack forces it to use the correct filename for the apk file when installing