aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Weickelt <richard@weickelt.de>2021-02-13 02:31:12 +0100
committerRichard Weickelt <richard@weickelt.de>2021-02-13 14:05:41 +0000
commitb50ea103ee25105e407e80b144f8489ba1ddd76b (patch)
treebbf0ef1770be212b4513d370964e105ec1fc6d74
parent4b1cdb826f9d87bec94f61a03039bc33793d22f0 (diff)
Do not rely on leaked context variables
The current QtScript implementation seems to leak variables of the prepare script context to invoked JS functions. This will become an error in the JS port. Change-Id: If4b43e6162b4c3ea1f1ec8f118474064dc9586c0 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r--share/qbs/modules/Exporter/pkgconfig/pkgconfig.js2
-rw-r--r--tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js b/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js
index a3109d61d..093be4c4b 100644
--- a/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js
+++ b/share/qbs/modules/Exporter/pkgconfig/pkgconfig.js
@@ -83,7 +83,7 @@ function collectAutodetectedData(topLevelProduct)
|| (value.length > installPrefix.length && value[installPrefix.length] !== '/')) {
return quotedValue;
}
- return quotedValue.replace(product.qbs.installPrefix, "${prefix}");
+ return quotedValue.replace(topLevelProduct.qbs.installPrefix, "${prefix}");
}
function transformedValue(product, moduleName, propertyName)
diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js
index cbb5781fc..b925effcf 100644
--- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js
+++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js
@@ -82,7 +82,7 @@ function readFlexOptions(filePath)
}
}
- var tf = new TextFile(input.filePath);
+ var tf = new TextFile(filePath);
var line;
var optrex = /^%option\s+(.*$)/;
var res;