Android: Fix android-*-deployment-settings.json detection

Qt 6.0 + CMake: The name for the Android deployment settings file needs
to be determined by using the build key of the current run configuration
rather than by using the display name of the project root node.

Since in contrast to qmake/Qbs, CMake does not supply us with the file
name and we have to contruct it ourselves. Therefore, it makes sense to
move the value into the Android plugin.

This change adds AndroidQtVersion::androidDeploymentSettings which lets
qmake and Qbs still provide the value as before while handling the CMake
fallback.

Fixes: QTCREATORBUG-25209
Change-Id: I12314d06a45d6e045cb654d9140f9d2ed4602f67
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
Alessandro Portale
2021-02-12 20:57:18 +01:00
parent 768d4321f9
commit ae5255cebd
6 changed files with 29 additions and 28 deletions

View File

@@ -78,7 +78,8 @@ static QStringList getSoLibSearchPath(const ProjectNode *node)
res.append(node->data(Constants::AndroidSoLibPath).toStringList());
});
const QString jsonFile = node->data(Android::Constants::AndroidDeploySettingsFile).toString();
const QString jsonFile = AndroidQtVersion::androidDeploymentSettings(
node->getProject()->activeTarget()).toString();
QFile deploymentSettings(jsonFile);
if (deploymentSettings.open(QIODevice::ReadOnly)) {
QJsonParseError error;