Android: Use the new Target::activeBuildKey() function

Change-Id: I051874a2b44129740b2ecc19f7ff401663d8bf0a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-03-31 20:25:54 +02:00
parent f83347ec00
commit 553c3c2c74
5 changed files with 23 additions and 29 deletions

View File

@@ -108,15 +108,13 @@ ChooseProFilePage::ChooseProFilePage(CreateAndroidManifestWizard *wizard)
fl->addRow(label);
BuildSystem *buildSystem = wizard->buildSystem();
QString currentBuildTarget;
if (RunConfiguration *rc = buildSystem->target()->activeRunConfiguration())
currentBuildTarget = rc->buildKey();
QString currentBuildKey = buildSystem->target()->activeBuildKey();
m_comboBox = new QComboBox(this);
for (const BuildTargetInfo &bti : buildSystem->applicationTargets()) {
const QString displayName = bti.buildKey;
m_comboBox->addItem(displayName, QVariant(bti.buildKey)); // TODO something more?
if (bti.buildKey == currentBuildTarget)
if (bti.buildKey == currentBuildKey)
m_comboBox->setCurrentIndex(m_comboBox->count() - 1);
}