forked from qt-creator/qt-creator
ProjectExplorer: Introduce Target::buildTarget(buildKey)
A convenience wrapper for applicationTargets().buildTargetInfo(buildKey), the only context using the BuildTargetInfoList member. Also, only one of the free comparison functions is ever used, only in one place. Inline it there. Change-Id: I7565e9d51d429af34352649e235243e5b3328fe9 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -157,7 +157,7 @@ ChooseDirectoryPage::ChooseDirectoryPage(CreateAndroidManifestWizard *wizard)
|
||||
void ChooseDirectoryPage::checkPackageSourceDir()
|
||||
{
|
||||
const QString buildKey = m_wizard->buildKey();
|
||||
const BuildTargetInfo bti = m_wizard->target()->applicationTargets().buildTargetInfo(buildKey);
|
||||
const BuildTargetInfo bti = m_wizard->target()->buildTarget(buildKey);
|
||||
const QString projectDir = bti.projectFilePath.toFileInfo().absolutePath();
|
||||
|
||||
const QString newDir = m_androidPackageSourceDir->path();
|
||||
@@ -181,7 +181,7 @@ void ChooseDirectoryPage::initializePage()
|
||||
{
|
||||
const Target *target = m_wizard->target();
|
||||
const QString buildKey = m_wizard->buildKey();
|
||||
const BuildTargetInfo bti = target->applicationTargets().buildTargetInfo(buildKey);
|
||||
const BuildTargetInfo bti = target->buildTarget(buildKey);
|
||||
const QString projectDir = bti.projectFilePath.toFileInfo().absolutePath();
|
||||
|
||||
QString androidPackageDir;
|
||||
@@ -357,7 +357,7 @@ void CreateAndroidManifestWizard::createAndroidTemplateFiles()
|
||||
|
||||
if (androidPackageDir.isEmpty()) {
|
||||
// and now time for some magic
|
||||
const BuildTargetInfo bti = m_target->applicationTargets().buildTargetInfo(m_buildKey);
|
||||
const BuildTargetInfo bti = m_target->buildTarget(m_buildKey);
|
||||
const QString value = "$$PWD/" + bti.projectFilePath.toFileInfo().absoluteDir().relativeFilePath(m_directory);
|
||||
bool result = node->setData(Android::Constants::AndroidPackageSourceDir, value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user