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

@@ -100,11 +100,11 @@ static QStringList getSoLibSearchPath(const RunConfiguration *rc)
return {};
QStringList res;
node->forEachProjectNode([&res, target](const ProjectNode *node) {
res.append(node->targetData(Constants::AndroidSoLibPath, target).toStringList());
node->forEachProjectNode([&res](const ProjectNode *node) {
res.append(node->data(Constants::AndroidSoLibPath).toStringList());
});
const QString jsonFile = node->targetData(Android::Constants::AndroidDeploySettingsFile, target).toString();
const QString jsonFile = node->data(Android::Constants::AndroidDeploySettingsFile).toString();
QFile deploymentSettings(jsonFile);
if (deploymentSettings.open(QIODevice::ReadOnly)) {
QJsonParseError error;
@@ -127,7 +127,7 @@ static QStringList getExtraLibs(const RunConfiguration *rc)
if (!node)
return {};
return node->targetData(Android::Constants::AndroidExtraLibs, rc->target()).toStringList();
return node->data(Android::Constants::AndroidExtraLibs).toStringList();
}
static QString toNdkArch(const QString &arch)