forked from qt-creator/qt-creator
Android: Replace two direct uses of Target::activeRunConfiguration
... by Target::activeBuildKey. This is effectively the same problem under the hood, but isolates it a bit. Change-Id: Ie37a4d67aab3e044bb99b7b8d2bd7900198c5538 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -101,9 +101,7 @@ static int parseMinSdk(const QDomElement &manifestElem);
|
|||||||
|
|
||||||
static const ProjectNode *currentProjectNode(const Target *target)
|
static const ProjectNode *currentProjectNode(const Target *target)
|
||||||
{
|
{
|
||||||
if (RunConfiguration *rc = target->activeRunConfiguration())
|
return target->project()->findNodeForBuildKey(target->activeBuildKey());
|
||||||
return target->project()->findNodeForBuildKey(rc->buildKey());
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AndroidManager::packageName(const Target *target)
|
QString AndroidManager::packageName(const Target *target)
|
||||||
@@ -643,7 +641,6 @@ static bool mergeGradleProperties(const QString &path, GradleProperties properti
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool AndroidManager::updateGradleProperties(Target *target, const QString &buildKey)
|
bool AndroidManager::updateGradleProperties(Target *target, const QString &buildKey)
|
||||||
{
|
{
|
||||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
QtSupport::BaseQtVersion *version = QtSupport::QtKitAspect::qtVersion(target->kit());
|
||||||
@@ -654,8 +651,7 @@ bool AndroidManager::updateGradleProperties(Target *target, const QString &build
|
|||||||
if (key.isEmpty()) {
|
if (key.isEmpty()) {
|
||||||
// FIXME: This case is triggered from AndroidBuildApkWidget::createApplicationGroup
|
// FIXME: This case is triggered from AndroidBuildApkWidget::createApplicationGroup
|
||||||
// and should be avoided.
|
// and should be avoided.
|
||||||
if (RunConfiguration *rc = target->activeRunConfiguration())
|
key = target->activeBuildKey();
|
||||||
key = rc->buildKey();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QTC_ASSERT(!key.isEmpty(), return false);
|
QTC_ASSERT(!key.isEmpty(), return false);
|
||||||
|
Reference in New Issue
Block a user