Android: allow passing apps arguments via manifest on non-debug mode

Uses 00a1e5da7e1aea373a7e6be1d51e1573ff167dd8.

Task-number: QTCREATORBUG-23712
Change-Id: I9a7e134420b608815589578f3851abf150674fd3
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This commit is contained in:
Assam Boudjelthia
2020-08-24 09:24:22 +03:00
parent 29bc4801e3
commit e9c9440653
7 changed files with 21 additions and 2 deletions

View File

@@ -112,7 +112,16 @@ AndroidRunConfiguration::AndroidRunConfiguration(Target *target, Utils::Id id)
auto envAspect = addAspect<EnvironmentAspect>();
envAspect->addSupportedBaseEnvironment(tr("Clean Environment"), {});
addAspect<ArgumentsAspect>();
auto extraAppArgsAspect = addAspect<ArgumentsAspect>();
connect(extraAppArgsAspect, &ArgumentsAspect::argumentsChanged, this, [target](const QString &arguments) {
if (target->buildConfigurations().first()->buildType() == BuildConfiguration::BuildType::Release) {
const QString buildKey = target->activeBuildKey();
target->buildSystem()->setExtraData(buildKey,
Android::Constants::ANDROID_APPLICATION_ARGUMENTS,
arguments);
}
});
auto amStartArgsAspect = addAspect<StringAspect>();
amStartArgsAspect->setId(Constants::ANDROID_AMSTARTARGS);