diff options
| author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-08-26 13:59:00 +0200 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-08-26 14:50:53 +0200 |
| commit | 0276bf6fb488a00fdcd5c0ebcbdb9ee6c5e37327 (patch) | |
| tree | 25dae749b7ae2d0eb2195361c98aa6c0fbe532c1 /src/lib/buildgraph | |
| parent | ea783a65336e5c84a1385c4e62b26a659474f46b (diff) | |
| download | qbs-0276bf6fb488a00fdcd5c0ebcbdb9ee6c5e37327.tar.gz | |
rename class PrepareScript to ScriptFunction
Later, we want to use this class for script function properties that
have a name that's different from "prepare".
Change-Id: Ic58a577116aa2b60b65b8648473bc84ff9d56aeb
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/lib/buildgraph')
| -rw-r--r-- | src/lib/buildgraph/transformer.cpp | 4 | ||||
| -rw-r--r-- | src/lib/buildgraph/transformer.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/buildgraph/transformer.cpp b/src/lib/buildgraph/transformer.cpp index 02c8ec3fe..4c61ac13d 100644 --- a/src/lib/buildgraph/transformer.cpp +++ b/src/lib/buildgraph/transformer.cpp @@ -142,12 +142,12 @@ static AbstractCommand *createCommandFromScriptValue(const QScriptValue &scriptV return cmdBase; } -void Transformer::createCommands(const PrepareScriptConstPtr &script, +void Transformer::createCommands(const ScriptFunctionConstPtr &script, const RulesEvaluationContextPtr &evalContext) { ScriptEngine * const engine = evalContext->engine(); if (!script->scriptFunction.isValid() || script->scriptFunction.engine() != engine) { - script->scriptFunction = engine->evaluate(script->script); + script->scriptFunction = engine->evaluate(script->sourceCode); if (Q_UNLIKELY(!script->scriptFunction.isFunction())) throw ErrorInfo(Tr::tr("Invalid prepare script."), script->location); } diff --git a/src/lib/buildgraph/transformer.h b/src/lib/buildgraph/transformer.h index 61dc41eeb..f6b6c4904 100644 --- a/src/lib/buildgraph/transformer.h +++ b/src/lib/buildgraph/transformer.h @@ -70,7 +70,7 @@ public: ResolvedProductPtr product() const; void setupInputs(QScriptEngine *scriptEngine, QScriptValue targetScriptValue); void setupOutputs(QScriptEngine *scriptEngine, QScriptValue targetScriptValue); - void createCommands(const PrepareScriptConstPtr &script, + void createCommands(const ScriptFunctionConstPtr &script, const RulesEvaluationContextPtr &evalContext); private: |
