summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-09-18 16:09:26 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2013-09-19 11:38:41 +0200
commit2c442b7b7e7a80522743f4b2931f615e1fc9beb5 (patch)
tree1662968fbe55d2d6f8d834148bde6c42f60e1bc9 /src/lib/buildgraph
parentef518a67368911f4a862387771c37da900792b29 (diff)
downloadqbs-2c442b7b7e7a80522743f4b2931f615e1fc9beb5.tar.gz
fix imports/extensions for script properties
Import directives in files of imported items were ignored for prepare scripts. We must use the file context (that contains the imports) of the file where the script property is set. Change-Id: Icca3fc84dd1e130446775122b7b58e6e9ddced98 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/buildgraph')
-rw-r--r--src/lib/buildgraph/buildgraph.cpp4
-rw-r--r--src/lib/buildgraph/projectbuilddata.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/buildgraph/buildgraph.cpp b/src/lib/buildgraph/buildgraph.cpp
index 3b0e9d438..d868d28b2 100644
--- a/src/lib/buildgraph/buildgraph.cpp
+++ b/src/lib/buildgraph/buildgraph.cpp
@@ -199,8 +199,8 @@ void setupScriptEngineForProduct(ScriptEngine *engine, const ResolvedProductCons
cache->productScriptValue.setProperty(QLatin1String("moduleName"),
rule->module->name.isEmpty() ? QScriptValue() : rule->module->name);
- engine->import(rule->jsImports, targetObject, targetObject);
- JsExtensions::setupExtensions(rule->jsExtensions, targetObject);
+ engine->import(rule->script->fileContext->jsImports, targetObject, targetObject);
+ JsExtensions::setupExtensions(rule->script->fileContext->jsExtensions, targetObject);
}
bool findPath(Artifact *u, Artifact *v, QList<Artifact*> &path)
diff --git a/src/lib/buildgraph/projectbuilddata.cpp b/src/lib/buildgraph/projectbuilddata.cpp
index 452a99675..aa39646db 100644
--- a/src/lib/buildgraph/projectbuilddata.cpp
+++ b/src/lib/buildgraph/projectbuilddata.cpp
@@ -298,8 +298,6 @@ void BuildDataResolver::resolveProductBuildData(const ResolvedProductPtr &produc
trafos += TrafoPair(rtrafo, transformer);
transformer->inputs = inputArtifacts;
const RulePtr rule = Rule::create();
- rule->jsImports = rtrafo->jsImports;
- rule->jsExtensions = rtrafo->jsExtensions;
ResolvedModulePtr module = ResolvedModule::create();
module->name = rtrafo->module->name;
rule->module = module;