ProjectExplorer: Drop the target argument

... from ProjectNode::targetData and setTargetData, and rename them
to data and setData.

It was only used in the implementation to retrieve the right node,
instead move the responsibility to find the right node to the caller.

Current assumption is that the functions were always called on
the right node already.

Change-Id: I9ae7e8a7ed5c79b924b99fd9a6a652bad56d114a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2018-12-18 17:52:19 +01:00
parent 51f93c0dfc
commit 5d1114fe52
10 changed files with 29 additions and 52 deletions

View File

@@ -304,7 +304,7 @@ Utils::FileName AndroidManager::manifestSourcePath(ProjectExplorer::Target *targ
{
if (const ProjectNode *node = currentProjectNode(target)) {
const QString packageSource
= node->targetData(Android::Constants::AndroidPackageSourceDir, target).toString();
= node->data(Android::Constants::AndroidPackageSourceDir).toString();
if (!packageSource.isEmpty()) {
const FileName manifest = FileName::fromUserInput(packageSource + "/AndroidManifest.xml");
if (manifest.exists())
@@ -627,7 +627,7 @@ bool AndroidManager::updateGradleProperties(ProjectExplorer::Target *target)
if (!node)
return false;
QFileInfo sourceDirInfo(node->targetData(Constants::AndroidPackageSourceDir, target).toString());
QFileInfo sourceDirInfo(node->data(Constants::AndroidPackageSourceDir).toString());
FileName packageSourceDir = FileName::fromString(sourceDirInfo.canonicalFilePath());
if (!packageSourceDir.appendPath("gradlew").exists())
return false;