diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-02-25 15:41:43 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-02-25 18:09:39 +0100 |
commit | 11a04709f4282a399c75e7ef6cc6624733de4c71 (patch) | |
tree | 013ec91676b175402d48bb7c410beaa4211062b6 | |
parent | 0816b8e476d20e00cbcffd1e71162adf93e85658 (diff) |
rename fileName property in prepare scripts to filePath
The fileName property of input/output in prepare scripts actually
represents a file path and is therefore renamed to filePath.
The old fileName property is deprecated but continues to work for a
while.
Task-number: QBS-258
Change-Id: I54524998571557d21f3aaebc0437be168207992e
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
-rw-r--r-- | src/lib/corelib/buildgraph/transformer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/transformer.cpp b/src/lib/corelib/buildgraph/transformer.cpp index 24547a583..492feeb0c 100644 --- a/src/lib/corelib/buildgraph/transformer.cpp +++ b/src/lib/corelib/buildgraph/transformer.cpp @@ -54,7 +54,13 @@ QScriptValue Transformer::translateFileConfig(QScriptEngine *scriptEngine, Artif { QScriptValue obj = scriptEngine->newObject(); ModuleProperties::init(obj, artifact); - obj.setProperty(QLatin1String("fileName"), artifact->filePath()); + + // ### undeprecate "fileName" and turn into a real file name in qbs 1.3 + ScriptEngine *qbsScriptEngine = static_cast<ScriptEngine *>(scriptEngine); + qbsScriptEngine->setDeprecatedProperty(obj, QLatin1String("fileName"), + QLatin1String("filePath"), artifact->filePath()); + + obj.setProperty(QLatin1String("filePath"), artifact->filePath()); const QStringList fileTags = artifact->fileTags.toStringList(); obj.setProperty(QLatin1String("fileTags"), scriptEngine->toScriptValue(fileTags)); if (!defaultModuleName.isEmpty()) |