aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-03-02 13:08:24 -0500
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-03-12 15:46:52 +0100
commit0575c5930c47af5cf7f533931dc2dc5205f552ee (patch)
tree3f99bb03c6a2a22146286a3e720c8aca391cf3c9 /share
parentd996dc6b08232c8e7e137f9259c447302737c581 (diff)
Rename doRepl to expandPlistEnvironmentVariables.
Because, that's what it does. Change-Id: Ibd6e5b4fc310be8ac48d8089fc163dcc678460be Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/modules/cpp/DarwinGCC.qbs2
-rw-r--r--share/qbs/modules/cpp/darwin-tools.js11
2 files changed, 7 insertions, 6 deletions
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs
index 0e368a294..d94264c12 100644
--- a/share/qbs/modules/cpp/DarwinGCC.qbs
+++ b/share/qbs/modules/cpp/DarwinGCC.qbs
@@ -273,7 +273,7 @@ UnixGCC {
for (key in buildEnv)
env[key] = buildEnv[key];
- DarwinTools.doRepl(aggregatePlist, env, true);
+ DarwinTools.expandPlistEnvironmentVariables(aggregatePlist, env, true);
}
if (infoPlistFormat === "same-as-input" && infoPlistFile)
diff --git a/share/qbs/modules/cpp/darwin-tools.js b/share/qbs/modules/cpp/darwin-tools.js
index 71d7a64c7..080215637 100644
--- a/share/qbs/modules/cpp/darwin-tools.js
+++ b/share/qbs/modules/cpp/darwin-tools.js
@@ -39,12 +39,13 @@ function _resourceFileProperties(path)
}
// perform replacements in env recursively
-// JSON.stringify(doRepl({a:"$(x)3$$(y)",b:{t:"%$(y) $(k)"}},{x:"X",y:"Y"}, true))
+// JSON.stringify(expandPlistEnvironmentVariables({a:"$(x)3$$(y)",b:{t:"%$(y) $(k)"}},
+// {x:"X",y:"Y"}, true))
// Warning undefined variable k in variable expansion
// => {"a":"X3$Y","b":{"t":"%Y $(k)"}}
-function doRepl(obj, env, warn)
+function expandPlistEnvironmentVariables(obj, env, warn)
{
- function doReplR(obj, env, checked) {
+ function expandRecursive(obj, env, checked) {
checked.push(obj);
for (var key in obj) {
var value =obj[key];
@@ -52,7 +53,7 @@ function doRepl(obj, env, warn)
if (type === "object") {
if (checked.indexOf(value) !== -1)
continue;
- doReplR(value, env, checked);
+ expandRecursive(value, env, checked);
}
if (type !== "string")
continue;
@@ -88,6 +89,6 @@ function doRepl(obj, env, warn)
obj[key] = value;
}
}
- doReplR(obj, env, []);
+ expandRecursive(obj, env, []);
return obj;
}