diff options
| author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-03-04 09:38:06 +0100 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-03-04 11:11:49 +0100 |
| commit | 58bf2dcfd673ddc04f08122f4035e598b5adb7d9 (patch) | |
| tree | 2c366178578607477a8b26c50d0793647ca07c3b /src/lib/buildgraph/rulesapplicator.cpp | |
| parent | 3c2757296dd96c4fdbdbd1b4b07ca29d00665056 (diff) | |
| download | qbs-58bf2dcfd673ddc04f08122f4035e598b5adb7d9.tar.gz | |
re-enable artifact config in Rule.Artifact.fileName
Remove the empty modules property.
Task-number: QBS-218
Change-Id: Ic8bdb6b032ca587346062aa1c887b6cc19672a77
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/buildgraph/rulesapplicator.cpp')
| -rw-r--r-- | src/lib/buildgraph/rulesapplicator.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/buildgraph/rulesapplicator.cpp b/src/lib/buildgraph/rulesapplicator.cpp index c8ad2fd7d..57ee72db9 100644 --- a/src/lib/buildgraph/rulesapplicator.cpp +++ b/src/lib/buildgraph/rulesapplicator.cpp @@ -34,6 +34,7 @@ #include "buildproject.h" #include "rulesevaluationcontext.h" #include "transformer.h" +#include <jsextensions/moduleproperties.h> #include <language/artifactproperties.h> #include <language/language.h> #include <language/scriptengine.h> @@ -198,17 +199,13 @@ void RulesApplicator::setupScriptEngineForArtifact(Artifact *artifact) basedir = FileInfo::path(buildDir.relativeFilePath(artifact->filePath())); } - //QScriptValue modulesScriptValue = artifact->properties->toScriptValue(engine()); - QScriptValue modulesScriptValue = engine()->newObject(); - modulesScriptValue = modulesScriptValue.property("modules"); - // expose per file properties we want to use in an Artifact within a Rule QScriptValue scriptValue = engine()->newObject(); + ModuleProperties::init(scriptValue, artifact); scriptValue.setProperty("fileName", inFileName); scriptValue.setProperty("baseName", inBaseName); scriptValue.setProperty("completeBaseName", inCompleteBaseName); scriptValue.setProperty("baseDir", basedir); - scriptValue.setProperty("modules", modulesScriptValue); scope().setProperty("input", scriptValue); Q_ASSERT_X(scriptValue.strictlyEquals(engine()->evaluate("input")), |
