aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-07-14 17:04:30 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-07-16 11:56:44 +0200
commitf7973489aef74b1df55f7466cd176e14bbfa76d0 (patch)
treeb9be29a1a857082768a341a87081affdfd99cf36
parenta623153d2b1af3490bab8885f0b3b768511cb42f (diff)
deprecate Artifact.fileName in favor of Artifact.filePath
This property is actually a file path, not a mere name. Task-number: QBS-579 Change-Id: I04e8f03eac97b5f86fe743a4923888a3d2a82c5d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--doc/reference/items/rule.qdoc2
-rw-r--r--doc/reference/items/transformer.qdoc2
-rw-r--r--share/qbs/modules/cpp/DarwinGCC.qbs10
-rw-r--r--share/qbs/modules/cpp/GenericGCC.qbs24
-rw-r--r--share/qbs/modules/cpp/ios-gcc.qbs4
-rw-r--r--share/qbs/modules/cpp/windows-mingw.qbs2
-rw-r--r--share/qbs/modules/cpp/windows-msvc.qbs20
-rw-r--r--share/qbs/modules/ib/IBModule.qbs2
-rw-r--r--share/qbs/modules/nsis/NSISModule.qbs2
-rw-r--r--share/qbs/modules/wix/WiXModule.qbs8
-rw-r--r--share/share.qbs2
-rw-r--r--src/lib/corelib/buildgraph/projectbuilddata.cpp2
-rw-r--r--src/lib/corelib/buildgraph/rulesapplicator.cpp2
-rw-r--r--src/lib/corelib/language/builtindeclarations.cpp2
-rw-r--r--src/lib/corelib/language/language.cpp6
-rw-r--r--src/lib/corelib/language/language.h2
-rw-r--r--src/lib/corelib/language/projectresolver.cpp51
-rw-r--r--src/lib/corelib/language/projectresolver.h4
-rw-r--r--src/lib/qtprofilesetup/templates/QtPlugin.qbs2
-rw-r--r--src/lib/qtprofilesetup/templates/core.qbs10
-rw-r--r--tests/auto/api/testdata/infinite-loop-js/infinite-loop.qbs2
-rw-r--r--tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs2
-rw-r--r--tests/auto/api/testdata/multi-arch/project.qbs2
-rw-r--r--tests/auto/blackbox/testdata/build-directories/project.qbs4
-rw-r--r--tests/auto/blackbox/testdata/codegen/codegen.qbs2
-rw-r--r--tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs2
-rw-r--r--tests/auto/blackbox/testdata/erroneous/nonexistentWorkingDir/project.qbs2
-rw-r--r--tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs2
-rw-r--r--tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs2
-rw-r--r--tests/auto/blackbox/testdata/productproperties/header.qbs2
-rw-r--r--tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs2
-rw-r--r--tests/auto/blackbox/testdata/propertyChanges/project.qbs4
-rw-r--r--tests/auto/blackbox/testdata/qt5plugin/plugin.qbs2
-rw-r--r--tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_rule.qbs2
-rw-r--r--tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_transformer.qbs2
-rw-r--r--tests/auto/blackbox/testdata/ruleCycle/ruleCycle.qbs4
-rw-r--r--tests/auto/blackbox/testdata/trackFileTags/after/project.qbs4
-rw-r--r--tests/auto/blackbox/testdata/trackFileTags/before/project.qbs4
-rw-r--r--tests/auto/blackbox/testdata/transformers/transformers.qbs6
-rw-r--r--tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs4
40 files changed, 128 insertions, 87 deletions
diff --git a/doc/reference/items/rule.qdoc b/doc/reference/items/rule.qdoc
index 85d18701e..16fb62758 100644
--- a/doc/reference/items/rule.qdoc
+++ b/doc/reference/items/rule.qdoc
@@ -51,7 +51,7 @@
Artifact {
fileTags: ['obj']
- fileName: '.obj/' + input.baseDir + '/' + input.fileName + '.o'
+ filePath: '.obj/' + input.baseDir + '/' + input.fileName + '.o'
}
prepare: {
diff --git a/doc/reference/items/transformer.qdoc b/doc/reference/items/transformer.qdoc
index 93e257b71..a5156a3d0 100644
--- a/doc/reference/items/transformer.qdoc
+++ b/doc/reference/items/transformer.qdoc
@@ -41,7 +41,7 @@
Transformer {
inputs: "raw_input.txt"
Artifact {
- fileName: "processed_input.txt"
+ filePath: "processed_input.txt"
fileTags: "processed_file"
}
prepare: {
diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs
index 376aefe3f..e74d4b84b 100644
--- a/share/qbs/modules/cpp/DarwinGCC.qbs
+++ b/share/qbs/modules/cpp/DarwinGCC.qbs
@@ -123,7 +123,7 @@ UnixGCC {
inputs: ["infoplist"]
Artifact {
- fileName: product.destinationDirectory + "/" + BundleTools.pkgInfoPath(product)
+ filePath: product.destinationDirectory + "/" + BundleTools.pkgInfoPath(product)
fileTags: ["pkginfo"]
}
@@ -155,7 +155,7 @@ UnixGCC {
inputs: ["qbs"]
Artifact {
- fileName: product.destinationDirectory + "/" + BundleTools.infoPlistPath(product)
+ filePath: product.destinationDirectory + "/" + BundleTools.infoPlistPath(product)
fileTags: ["infoplist"]
}
@@ -315,7 +315,7 @@ UnixGCC {
inputs: ["application"]
Artifact {
- fileName: product.destinationDirectory + "/" + PathTools.dwarfDsymFileName(product)
+ filePath: product.destinationDirectory + "/" + PathTools.dwarfDsymFileName(product)
fileTags: ["application_dsym"]
}
@@ -336,7 +336,7 @@ UnixGCC {
"resourcerules", "ipa"]
Artifact {
- fileName: product.destinationDirectory + "/" + BundleTools.wrapperName(product)
+ filePath: product.destinationDirectory + "/" + BundleTools.wrapperName(product)
fileTags: ["applicationbundle"]
}
@@ -354,7 +354,7 @@ UnixGCC {
inputs: ["dynamiclibrary", "infoplist", "pkginfo", "dynamiclibrary_dsym", "compiled_nib"]
Artifact {
- fileName: product.destinationDirectory + "/" + BundleTools.wrapperName(product)
+ filePath: product.destinationDirectory + "/" + BundleTools.wrapperName(product)
fileTags: ["frameworkbundle"]
}
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs
index 67da0d1bb..7b9fb0478 100644
--- a/share/qbs/modules/cpp/GenericGCC.qbs
+++ b/share/qbs/modules/cpp/GenericGCC.qbs
@@ -69,31 +69,31 @@ CppModule {
usings: ["dynamiclibrary_copy", "staticlibrary", "frameworkbundle"]
Artifact {
- fileName: product.destinationDirectory + "/" + PathTools.dynamicLibraryFilePath(product)
+ filePath: product.destinationDirectory + "/" + PathTools.dynamicLibraryFilePath(product)
fileTags: ["dynamiclibrary"]
}
// libfoo
Artifact {
- fileName: product.destinationDirectory + "/" + PathTools.dynamicLibraryFileName(product, undefined, 0)
+ filePath: product.destinationDirectory + "/" + PathTools.dynamicLibraryFileName(product, undefined, 0)
fileTags: ["dynamiclibrary_symlink"]
}
// libfoo.1
Artifact {
- fileName: product.destinationDirectory + "/" + PathTools.dynamicLibraryFileName(product, undefined, 1)
+ filePath: product.destinationDirectory + "/" + PathTools.dynamicLibraryFileName(product, undefined, 1)
fileTags: ["dynamiclibrary_symlink"]
}
// libfoo.1.0
Artifact {
- fileName: product.destinationDirectory + "/" + PathTools.dynamicLibraryFileName(product, undefined, 2)
+ filePath: product.destinationDirectory + "/" + PathTools.dynamicLibraryFileName(product, undefined, 2)
fileTags: ["dynamiclibrary_symlink"]
}
// Copy of dynamic lib for smart re-linking.
Artifact {
- fileName: product.destinationDirectory + "/.socopy/"
+ filePath: product.destinationDirectory + "/.socopy/"
+ PathTools.dynamicLibraryFilePath(product)
fileTags: ["dynamiclibrary_copy"]
alwaysUpdated: false
@@ -229,7 +229,7 @@ CppModule {
usings: ["dynamiclibrary", "staticlibrary", "frameworkbundle"]
Artifact {
- fileName: product.destinationDirectory + "/" + PathTools.staticLibraryFilePath(product)
+ filePath: product.destinationDirectory + "/" + PathTools.staticLibraryFilePath(product)
fileTags: ["staticlibrary"]
cpp.staticLibraries: {
var result = []
@@ -275,7 +275,7 @@ CppModule {
usings: ["dynamiclibrary_copy", "staticlibrary", "frameworkbundle"]
Artifact {
- fileName: product.destinationDirectory + "/" + PathTools.applicationFilePath(product)
+ filePath: product.destinationDirectory + "/" + PathTools.applicationFilePath(product)
fileTags: ["application"]
}
@@ -344,7 +344,7 @@ CppModule {
Artifact {
fileTags: ["obj"]
- fileName: ".obj/" + input.baseDir + "/" + input.fileName + ".o"
+ filePath: ".obj/" + input.baseDir + "/" + input.fileName + ".o"
}
prepare: {
@@ -356,7 +356,7 @@ CppModule {
condition: cPrecompiledHeader !== undefined
inputs: cPrecompiledHeader
Artifact {
- fileName: product.name + "_c.gch"
+ filePath: product.name + "_c.gch"
fileTags: "c_pch"
}
prepare: {
@@ -368,7 +368,7 @@ CppModule {
condition: cxxPrecompiledHeader !== undefined
inputs: cxxPrecompiledHeader
Artifact {
- fileName: product.name + "_cpp.gch"
+ filePath: product.name + "_cpp.gch"
fileTags: "cpp_pch"
}
prepare: {
@@ -380,7 +380,7 @@ CppModule {
condition: objcPrecompiledHeader !== undefined
inputs: objcPrecompiledHeader
Artifact {
- fileName: product.name + "_objc.gch"
+ filePath: product.name + "_objc.gch"
fileTags: "objc_pch"
}
prepare: {
@@ -392,7 +392,7 @@ CppModule {
condition: objcxxPrecompiledHeader !== undefined
inputs: objcxxPrecompiledHeader
Artifact {
- fileName: product.name + "_objcpp.gch"
+ filePath: product.name + "_objcpp.gch"
fileTags: "objcpp_pch"
}
prepare: {
diff --git a/share/qbs/modules/cpp/ios-gcc.qbs b/share/qbs/modules/cpp/ios-gcc.qbs
index aeb1ad767..dced87c27 100644
--- a/share/qbs/modules/cpp/ios-gcc.qbs
+++ b/share/qbs/modules/cpp/ios-gcc.qbs
@@ -24,7 +24,7 @@ DarwinGCC {
inputs: ["qbs"]
Artifact {
- fileName: product.destinationDirectory + "/"
+ filePath: product.destinationDirectory + "/"
+ BundleTools.contentsFolderPath(product)
+ "/ResourceRules.plist"
fileTags: ["resourcerules"]
@@ -48,7 +48,7 @@ DarwinGCC {
inputs: ["application", "infoplist", "pkginfo", "resourcerules", "compiled_nib"]
Artifact {
- fileName: product.destinationDirectory + "/" + product.targetName + ".ipa"
+ filePath: product.destinationDirectory + "/" + product.targetName + ".ipa"
fileTags: ["ipa"]
}
diff --git a/share/qbs/modules/cpp/windows-mingw.qbs b/share/qbs/modules/cpp/windows-mingw.qbs
index ea66d61f4..809485b78 100644
--- a/share/qbs/modules/cpp/windows-mingw.qbs
+++ b/share/qbs/modules/cpp/windows-mingw.qbs
@@ -39,7 +39,7 @@ GenericGCC {
inputs: ["rc"]
Artifact {
- fileName: ".obj/" + input.baseDir.replace(':', '') + "/" + input.completeBaseName + "_res.o"
+ filePath: ".obj/" + input.baseDir.replace(':', '') + "/" + input.completeBaseName + "_res.o"
fileTags: ["obj"]
}
diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs
index 2af9065a6..2779ec830 100644
--- a/share/qbs/modules/cpp/windows-msvc.qbs
+++ b/share/qbs/modules/cpp/windows-msvc.qbs
@@ -34,7 +34,7 @@ CppModule {
inputs: cPrecompiledHeader
Artifact {
fileTags: ['obj']
- fileName: {
+ filePath: {
var completeBaseName = FileInfo.completeBaseName(product.moduleProperty("cpp",
"cPrecompiledHeader"));
return ".obj/" + completeBaseName + '_c.obj'
@@ -42,7 +42,7 @@ CppModule {
}
Artifact {
fileTags: ['c_pch']
- fileName: ".obj/" + product.name + '_c.pch'
+ filePath: ".obj/" + product.name + '_c.pch'
}
prepare: {
var platformDefines = ModUtils.moduleProperty(input, 'platformDefines');
@@ -61,7 +61,7 @@ CppModule {
explicitlyDependsOn: ["c_pch"] // to prevent vc--0.pdb conflict
Artifact {
fileTags: ['obj']
- fileName: {
+ filePath: {
var completeBaseName = FileInfo.completeBaseName(product.moduleProperty("cpp",
"cxxPrecompiledHeader"));
return ".obj/" + completeBaseName + '_cpp.obj'
@@ -69,7 +69,7 @@ CppModule {
}
Artifact {
fileTags: ['cpp_pch']
- fileName: ".obj/" + product.name + '_cpp.pch'
+ filePath: ".obj/" + product.name + '_cpp.pch'
}
prepare: {
var platformDefines = ModUtils.moduleProperty(input, 'platformDefines');
@@ -90,7 +90,7 @@ CppModule {
Artifact {
fileTags: ['obj']
- fileName: ".obj/" + input.baseDir.replace(':', '') + "/" + input.fileName + ".obj"
+ filePath: ".obj/" + input.baseDir.replace(':', '') + "/" + input.fileName + ".obj"
}
prepare: {
@@ -113,7 +113,7 @@ CppModule {
usings: ['staticlibrary', 'dynamiclibrary_import']
Artifact {
fileTags: ["application"]
- fileName: product.destinationDirectory + "/" + PathTools.applicationFilePath(product)
+ filePath: product.destinationDirectory + "/" + PathTools.applicationFilePath(product)
}
prepare: {
@@ -134,12 +134,12 @@ CppModule {
Artifact {
fileTags: ["dynamiclibrary"]
- fileName: product.destinationDirectory + "/" + PathTools.dynamicLibraryFilePath(product)
+ filePath: product.destinationDirectory + "/" + PathTools.dynamicLibraryFilePath(product)
}
Artifact {
fileTags: ["dynamiclibrary_import"]
- fileName: product.destinationDirectory + "/" + PathTools.importLibraryFilePath(product)
+ filePath: product.destinationDirectory + "/" + PathTools.importLibraryFilePath(product)
alwaysUpdated: false
}
@@ -161,7 +161,7 @@ CppModule {
Artifact {
fileTags: ["staticlibrary"]
- fileName: product.destinationDirectory + "/" + PathTools.staticLibraryFilePath(product)
+ filePath: product.destinationDirectory + "/" + PathTools.staticLibraryFilePath(product)
cpp.staticLibraries: {
var result = []
for (var i in inputs.staticlibrary) {
@@ -200,7 +200,7 @@ CppModule {
inputs: ["rc"]
Artifact {
- fileName: ".obj/" + input.baseDir.replace(':', '') + "/" + input.completeBaseName + ".res"
+ filePath: ".obj/" + input.baseDir.replace(':', '') + "/" + input.completeBaseName + ".res"
fileTags: ["obj"]
}
diff --git a/share/qbs/modules/ib/IBModule.qbs b/share/qbs/modules/ib/IBModule.qbs
index c8037f243..abc0cfcb0 100644
--- a/share/qbs/modules/ib/IBModule.qbs
+++ b/share/qbs/modules/ib/IBModule.qbs
@@ -29,7 +29,7 @@ Module {
explicitlyDependsOn: ["infoplist"]
Artifact {
- fileName: {
+ filePath: {
var path = product.destinationDirectory;
var xibFilePath = input.baseDir + '/' + input.fileName;
diff --git a/share/qbs/modules/nsis/NSISModule.qbs b/share/qbs/modules/nsis/NSISModule.qbs
index ad8b84238..349c7fe5d 100644
--- a/share/qbs/modules/nsis/NSISModule.qbs
+++ b/share/qbs/modules/nsis/NSISModule.qbs
@@ -117,7 +117,7 @@ Module {
Artifact {
fileTags: ["nsissetup", "application"]
- fileName: product.destinationDirectory + "/" + product.targetName + ModUtils.moduleProperty(product, "executableSuffix")
+ filePath: product.destinationDirectory + "/" + product.targetName + ModUtils.moduleProperty(product, "executableSuffix")
}
prepare: {
diff --git a/share/qbs/modules/wix/WiXModule.qbs b/share/qbs/modules/wix/WiXModule.qbs
index 940b7a518..e2803da73 100644
--- a/share/qbs/modules/wix/WiXModule.qbs
+++ b/share/qbs/modules/wix/WiXModule.qbs
@@ -152,7 +152,7 @@ Module {
Artifact {
fileTags: ["wixobj"]
- fileName: ".obj/" + input.baseDir.replace(':', '') + "/" + FileInfo.baseName(input.fileName) + ".wixobj"
+ filePath: ".obj/" + input.baseDir.replace(':', '') + "/" + FileInfo.baseName(input.fileName) + ".wixobj"
}
prepare: {
@@ -295,19 +295,19 @@ Module {
Artifact {
condition: product.type.contains("wixsetup")
fileTags: ["wixsetup", "application"]
- fileName: product.destinationDirectory + "/" + product.targetName + ModUtils.moduleProperty(product, "executableSuffix")
+ filePath: product.destinationDirectory + "/" + product.targetName + ModUtils.moduleProperty(product, "executableSuffix")
}
Artifact {
condition: product.type.contains("msi")
fileTags: ["msi"]
- fileName: product.destinationDirectory + "/" + product.targetName + ModUtils.moduleProperty(product, "windowsInstallerSuffix")
+ filePath: product.destinationDirectory + "/" + product.targetName + ModUtils.moduleProperty(product, "windowsInstallerSuffix")
}
Artifact {
condition: product.moduleProperty("qbs", "debugInformation") // ### QBS-412
fileTags: ["wixpdb"]
- fileName: product.destinationDirectory + "/" + product.targetName + ".wixpdb"
+ filePath: product.destinationDirectory + "/" + product.targetName + ".wixpdb"
}
prepare: {
diff --git a/share/share.qbs b/share/share.qbs
index 070e8df02..c00674e81 100644
--- a/share/share.qbs
+++ b/share/share.qbs
@@ -18,7 +18,7 @@ Product {
Transformer {
inputs: "qbs"
Artifact {
- fileName: "share/qbs"
+ filePath: "share/qbs"
}
prepare: {
var cmd = new JavaScriptCommand();
diff --git a/src/lib/corelib/buildgraph/projectbuilddata.cpp b/src/lib/corelib/buildgraph/projectbuilddata.cpp
index abc95c8b7..327154e8e 100644
--- a/src/lib/corelib/buildgraph/projectbuilddata.cpp
+++ b/src/lib/corelib/buildgraph/projectbuilddata.cpp
@@ -495,7 +495,7 @@ void BuildDataResolver::resolveProductBuildData(const ResolvedProductPtr &produc
product->registerAddedArtifact(outputArtifact);
RuleArtifactPtr ruleArtifact = RuleArtifact::create();
- ruleArtifact->fileName = outputArtifact->filePath();
+ ruleArtifact->filePath = outputArtifact->filePath();
ruleArtifact->fileTags = outputArtifact->fileTags;
rule->artifacts += ruleArtifact;
}
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp
index 0da5a2a49..aad148ab3 100644
--- a/src/lib/corelib/buildgraph/rulesapplicator.cpp
+++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp
@@ -276,7 +276,7 @@ ArtifactSet RulesApplicator::collectOldOutputArtifacts(const ArtifactSet &inputA
Artifact *RulesApplicator::createOutputArtifactFromRuleArtifact(
const RuleArtifactConstPtr &ruleArtifact, const ArtifactSet &inputArtifacts)
{
- QScriptValue scriptValue = engine()->evaluate(ruleArtifact->fileName);
+ QScriptValue scriptValue = engine()->evaluate(ruleArtifact->filePath);
if (Q_UNLIKELY(engine()->hasErrorOrException(scriptValue))) {
throw ErrorInfo(Tr::tr("Error in Rule.Artifact fileName at %1: %2")
.arg(ruleArtifact->location.toString(), scriptValue.toString()));
diff --git a/src/lib/corelib/language/builtindeclarations.cpp b/src/lib/corelib/language/builtindeclarations.cpp
index 2f97d7158..85eedf843 100644
--- a/src/lib/corelib/language/builtindeclarations.cpp
+++ b/src/lib/corelib/language/builtindeclarations.cpp
@@ -129,7 +129,9 @@ void BuiltinDeclarations::addArtifactItem()
{
ItemDeclaration item(QLatin1String("Artifact"));
item << conditionProperty();
+ // ### remove Artifact.fileName in qbs 1.4
item << PropertyDeclaration(QLatin1String("fileName"), PropertyDeclaration::Verbatim);
+ item << PropertyDeclaration(QLatin1String("filePath"), PropertyDeclaration::Verbatim);
item << PropertyDeclaration(QLatin1String("fileTags"), PropertyDeclaration::Variant);
PropertyDeclaration decl(QLatin1String("alwaysUpdated"), PropertyDeclaration::Boolean);
decl.setInitialValueSource(QLatin1String("true"));
diff --git a/src/lib/corelib/language/language.cpp b/src/lib/corelib/language/language.cpp
index d7815938e..6b90011d3 100644
--- a/src/lib/corelib/language/language.cpp
+++ b/src/lib/corelib/language/language.cpp
@@ -202,7 +202,7 @@ void ResolvedGroup::store(PersistentPool &pool) const
void RuleArtifact::load(PersistentPool &pool)
{
pool.stream()
- >> fileName
+ >> filePath
>> fileTags
>> alwaysUpdated
>> location;
@@ -221,7 +221,7 @@ void RuleArtifact::load(PersistentPool &pool)
void RuleArtifact::store(PersistentPool &pool) const
{
pool.stream()
- << fileName
+ << filePath
<< fileTags
<< alwaysUpdated
<< location;
@@ -1281,7 +1281,7 @@ bool operator==(const RuleArtifact &a1, const RuleArtifact &a2)
return true;
if (!&a1 != !&a2)
return false;
- return a1.fileName == a2.fileName
+ return a1.filePath == a2.filePath
&& a1.fileTags == a2.fileTags
&& a1.alwaysUpdated == a2.alwaysUpdated
&& a1.bindings.toList().toSet() == a2.bindings.toList().toSet();
diff --git a/src/lib/corelib/language/language.h b/src/lib/corelib/language/language.h
index e7df3232e..bff76aab8 100644
--- a/src/lib/corelib/language/language.h
+++ b/src/lib/corelib/language/language.h
@@ -94,7 +94,7 @@ class RuleArtifact : public PersistentObject
public:
static RuleArtifactPtr create() { return RuleArtifactPtr(new RuleArtifact); }
- QString fileName;
+ QString filePath;
FileTags fileTags;
bool alwaysUpdated;
CodeLocation location;
diff --git a/src/lib/corelib/language/projectresolver.cpp b/src/lib/corelib/language/projectresolver.cpp
index 9f7f5fb78..a30422cf8 100644
--- a/src/lib/corelib/language/projectresolver.cpp
+++ b/src/lib/corelib/language/projectresolver.cpp
@@ -129,19 +129,24 @@ void ProjectResolver::checkCancelation() const
}
}
-QString ProjectResolver::verbatimValue(const ValueConstPtr &value) const
+QString ProjectResolver::verbatimValue(const ValueConstPtr &value, bool *propertyWasSet) const
{
QString result;
if (value && value->type() == Value::JSSourceValueType) {
const JSSourceValueConstPtr sourceValue = value.staticCast<const JSSourceValue>();
result = sourceValue->sourceCodeForEvaluation();
+ if (propertyWasSet)
+ *propertyWasSet = (result != QLatin1String("undefined"));
+ } else {
+ if (propertyWasSet)
+ *propertyWasSet = false;
}
return result;
}
-QString ProjectResolver::verbatimValue(Item *item, const QString &name) const
+QString ProjectResolver::verbatimValue(Item *item, const QString &name, bool *propertyWasSet) const
{
- return verbatimValue(item->property(name));
+ return verbatimValue(item->property(name), propertyWasSet);
}
void ProjectResolver::ignoreItem(Item *item, ProjectContext *projectContext)
@@ -675,7 +680,24 @@ void ProjectResolver::resolveRuleArtifact(const RulePtr &rule, Item *item,
RuleArtifactPtr artifact = RuleArtifact::create();
rule->artifacts += artifact;
artifact->location = item->location();
- artifact->fileName = verbatimValue(item, QLatin1String("fileName"));
+
+ bool filePathSet;
+ artifact->filePath = verbatimValue(item, QLatin1String("filePath"), &filePathSet);
+
+ // ### remove Artifact.fileName in qbs 1.4
+ bool fileNameSet;
+ const QString deprecatedFileName = verbatimValue(item, QLatin1String("fileName"), &fileNameSet);
+ if (fileNameSet) {
+ if (filePathSet) {
+ throw ErrorInfo(Tr::tr("Artifact.fileName and Artifact.filePath cannot both be set."),
+ item->location());
+ }
+ artifact->filePath = deprecatedFileName;
+ m_logger.printWarning(ErrorInfo(Tr::tr("The property Artifact.fileName is deprecated. "
+ "Please use Artifact.filePath instead."),
+ item->location()));
+ }
+
artifact->fileTags = m_evaluator->fileTagsValue(item, QLatin1String("fileTags"));
artifact->alwaysUpdated = m_evaluator->boolValue(item, QLatin1String("alwaysUpdated"));
if (artifact->alwaysUpdated)
@@ -765,9 +787,26 @@ void ProjectResolver::resolveTransformer(Item *item, ProjectContext *projectCont
throw ErrorInfo(Tr::tr("Transformer: wrong child type '%0'.").arg(child->typeName()));
SourceArtifactPtr artifact = SourceArtifact::create();
artifact->properties = m_productContext->product->moduleProperties;
- QString fileName = m_evaluator->stringValue(child, QLatin1String("fileName"));
+ // ### remove Artifact.fileName in qbs 1.4
+ bool fileNameSet;
+ QString fileName = m_evaluator->stringValue(child, QLatin1String("fileName"), QString(),
+ &fileNameSet);
+ bool filePathSet;
+ QString filePath = m_evaluator->stringValue(child, QLatin1String("filePath"), QString(),
+ &filePathSet);
+ if (fileNameSet && filePathSet) {
+ throw ErrorInfo(Tr::tr("Artifact.fileName and Artifact.filePath cannot both be set."),
+ child->location());
+ }
+ if (fileNameSet) {
+ m_logger.printWarning(ErrorInfo(Tr::tr("The property Artifact.fileName is deprecated. "
+ "Please use Artifact.filePath instead."),
+ child->location()));
+ } else {
+ fileName = filePath;
+ }
if (Q_UNLIKELY(fileName.isEmpty()))
- throw ErrorInfo(Tr::tr("Artifact fileName must not be empty."));
+ throw ErrorInfo(Tr::tr("Artifact.filePath must not be empty."));
artifact->absoluteFilePath
= FileInfo::resolvePath(m_productContext->buildDirectory, fileName);
artifact->fileTags = m_evaluator->fileTagsValue(child, QLatin1String("fileTags"));
diff --git a/src/lib/corelib/language/projectresolver.h b/src/lib/corelib/language/projectresolver.h
index 422f4d4ce..ab1bfd6a2 100644
--- a/src/lib/corelib/language/projectresolver.h
+++ b/src/lib/corelib/language/projectresolver.h
@@ -91,8 +91,8 @@ private:
};
void checkCancelation() const;
- QString verbatimValue(const ValueConstPtr &value) const;
- QString verbatimValue(Item *item, const QString &name) const;
+ QString verbatimValue(const ValueConstPtr &value, bool *propertyWasSet = 0) const;
+ QString verbatimValue(Item *item, const QString &name, bool *propertyWasSet = 0) const;
ScriptFunctionPtr scriptFunctionValue(Item *item, const QString &name) const;
ResolvedFileContextPtr resolvedFileContext(const FileContextConstPtr &ctx) const;
void ignoreItem(Item *item, ProjectContext *projectContext);
diff --git a/src/lib/qtprofilesetup/templates/QtPlugin.qbs b/src/lib/qtprofilesetup/templates/QtPlugin.qbs
index 86fd9ff81..25c30101c 100644
--- a/src/lib/qtprofilesetup/templates/QtPlugin.qbs
+++ b/src/lib/qtprofilesetup/templates/QtPlugin.qbs
@@ -10,7 +10,7 @@ QtModule {
Transformer {
condition: isStaticLibrary
Artifact {
- fileName: product.targetName + "_qt_plugin_import_"
+ filePath: product.targetName + "_qt_plugin_import_"
+ parent.parent.qtModuleName + ".cpp"
fileTags: "cpp"
}
diff --git a/src/lib/qtprofilesetup/templates/core.qbs b/src/lib/qtprofilesetup/templates/core.qbs
index 42adea266..3c95d21db 100644
--- a/src/lib/qtprofilesetup/templates/core.qbs
+++ b/src/lib/qtprofilesetup/templates/core.qbs
@@ -230,7 +230,7 @@ Module {
inputs: ["qrc"]
Artifact {
- fileName: ModUtils.moduleProperty(product, "generatedFilesDir")
+ filePath: ModUtils.moduleProperty(product, "generatedFilesDir")
+ "/qrc_" + input.completeBaseName + ".cpp";
fileTags: ["cpp"]
}
@@ -249,7 +249,7 @@ Module {
inputs: ["ts"]
Artifact {
- fileName: FileInfo.joinPaths(ModUtils.moduleProperty(product, "qmFilesDir"),
+ filePath: FileInfo.joinPaths(ModUtils.moduleProperty(product, "qmFilesDir"),
input.completeBaseName + ".qm")
fileTags: ["qm"]
}
@@ -269,12 +269,12 @@ Module {
explicitlyDependsOn: ["qdoc", "qdocconf"]
Artifact {
- fileName: ModUtils.moduleProperty(product, "generatedFilesDir") + "/html"
+ filePath: ModUtils.moduleProperty(product, "generatedFilesDir") + "/html"
fileTags: ["qdoc-html"]
}
Artifact {
- fileName: ModUtils.moduleProperty(product, "generatedFilesDir") + "/html/"
+ filePath: ModUtils.moduleProperty(product, "generatedFilesDir") + "/html/"
+ ModUtils.moduleProperty(product, "qdocQhpFileName")
fileTags: ["qhp"]
}
@@ -301,7 +301,7 @@ Module {
inputs: "qhp"
Artifact {
- fileName: ModUtils.moduleProperty(product, "generatedFilesDir")
+ filePath: ModUtils.moduleProperty(product, "generatedFilesDir")
+ '/' + input.completeBaseName + ".qch"
fileTags: ["qch"]
}
diff --git a/tests/auto/api/testdata/infinite-loop-js/infinite-loop.qbs b/tests/auto/api/testdata/infinite-loop-js/infinite-loop.qbs
index 85f2b880e..e98fda511 100644
--- a/tests/auto/api/testdata/infinite-loop-js/infinite-loop.qbs
+++ b/tests/auto/api/testdata/infinite-loop-js/infinite-loop.qbs
@@ -4,7 +4,7 @@ Product {
type: "mytype"
Transformer {
Artifact {
- fileName: "output.txt"
+ filePath: "output.txt"
fileTags: "mytype"
}
prepare: {
diff --git a/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs b/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
index 504bf87b0..540ce030a 100644
--- a/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
+++ b/tests/auto/api/testdata/infinite-loop-process/infinite-loop.qbs
@@ -14,7 +14,7 @@ Project {
Rule {
usings: "application"
Artifact {
- fileName: "dummy"
+ filePath: "dummy"
fileTags: "mytype"
}
prepare: {
diff --git a/tests/auto/api/testdata/multi-arch/project.qbs b/tests/auto/api/testdata/multi-arch/project.qbs
index 1d8221b97..2bb1657f3 100644
--- a/tests/auto/api/testdata/multi-arch/project.qbs
+++ b/tests/auto/api/testdata/multi-arch/project.qbs
@@ -27,7 +27,7 @@ Project {
Rule {
inputs: "input"
Artifact {
- fileName: FileInfo.baseName(input.fileName) + ".output"
+ filePath: FileInfo.baseName(input.fileName) + ".output"
fileTags: "output"
}
prepare: {
diff --git a/tests/auto/blackbox/testdata/build-directories/project.qbs b/tests/auto/blackbox/testdata/build-directories/project.qbs
index cb83999e2..4d2758527 100644
--- a/tests/auto/blackbox/testdata/build-directories/project.qbs
+++ b/tests/auto/blackbox/testdata/build-directories/project.qbs
@@ -6,7 +6,7 @@ Project {
type: "blubb1"
Transformer {
Artifact {
- fileName: "dummy1.txt"
+ filePath: "dummy1.txt"
fileTags: product.type
}
prepare: {
@@ -26,7 +26,7 @@ Project {
Rule {
usings: "blubb1"
Artifact {
- fileName: "dummy2.txt"
+ filePath: "dummy2.txt"
fileTags: product.type
}
prepare: {
diff --git a/tests/auto/blackbox/testdata/codegen/codegen.qbs b/tests/auto/blackbox/testdata/codegen/codegen.qbs
index 1a05ad4f0..4b440fc51 100644
--- a/tests/auto/blackbox/testdata/codegen/codegen.qbs
+++ b/tests/auto/blackbox/testdata/codegen/codegen.qbs
@@ -25,7 +25,7 @@ Project {
inputs: ['text']
Artifact {
fileTags: ['cpp']
- fileName: input.baseName + '.cpp'
+ filePath: input.baseName + '.cpp'
}
prepare: {
function expandMacros(str, table)
diff --git a/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs b/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs
index a5ff12eb2..836463379 100644
--- a/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs
+++ b/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs
@@ -10,7 +10,7 @@ Project {
Transformer {
Artifact {
fileTags: ["deps"]
- fileName: product.name + '.deps'
+ filePath: product.name + '.deps'
}
prepare: {
var cmd = new JavaScriptCommand();
diff --git a/tests/auto/blackbox/testdata/erroneous/nonexistentWorkingDir/project.qbs b/tests/auto/blackbox/testdata/erroneous/nonexistentWorkingDir/project.qbs
index db0b0d607..6433d80d9 100644
--- a/tests/auto/blackbox/testdata/erroneous/nonexistentWorkingDir/project.qbs
+++ b/tests/auto/blackbox/testdata/erroneous/nonexistentWorkingDir/project.qbs
@@ -4,7 +4,7 @@ Application {
name: "kaputt"
Transformer {
Artifact {
- fileName: "Stulle"
+ filePath: "Stulle"
fileTags: ["nutritious"]
}
prepare: {
diff --git a/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs b/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs
index 57172a442..3db802717 100644
--- a/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs
+++ b/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs
@@ -11,7 +11,7 @@ Product {
Transformer {
explicitlyDependsOn: "txt"
Artifact {
- fileName: "test.mytype"
+ filePath: "test.mytype"
fileTags: product.type
}
prepare: {
diff --git a/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs b/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs
index c9d64c8bb..ce7970f20 100644
--- a/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs
+++ b/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs
@@ -21,7 +21,7 @@ Project {
inputs: ['text']
Artifact {
fileTags: ['cpp']
- fileName: input.baseName + '.cpp'
+ filePath: input.baseName + '.cpp'
}
prepare: {
var cmd = new JavaScriptCommand();
diff --git a/tests/auto/blackbox/testdata/productproperties/header.qbs b/tests/auto/blackbox/testdata/productproperties/header.qbs
index 56ad8fc78..ee08de1e2 100644
--- a/tests/auto/blackbox/testdata/productproperties/header.qbs
+++ b/tests/auto/blackbox/testdata/productproperties/header.qbs
@@ -9,7 +9,7 @@ Product {
Transformer {
Artifact {
- fileName: "blubb_header.h"
+ filePath: "blubb_header.h"
fileTags: "hpp"
}
prepare: {
diff --git a/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs b/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs
index 1c3e363c9..ea63b09b2 100644
--- a/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs
+++ b/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs
@@ -11,7 +11,7 @@ Module {
inputs: ['test-input']
Artifact {
fileTags: "test-output"
- fileName: input.fileName + ".out"
+ filePath: input.fileName + ".out"
}
prepare: {
diff --git a/tests/auto/blackbox/testdata/propertyChanges/project.qbs b/tests/auto/blackbox/testdata/propertyChanges/project.qbs
index f6a48e1d4..02c9633db 100644
--- a/tests/auto/blackbox/testdata/propertyChanges/project.qbs
+++ b/tests/auto/blackbox/testdata/propertyChanges/project.qbs
@@ -31,7 +31,7 @@ Project {
property string fileContentPrefix: "prefix 1"
Transformer {
- Artifact { fileName: "nothing" }
+ Artifact { filePath: "nothing" }
prepare: {
var cmd = new JavaScriptCommand();
cmd.silent = true;
@@ -41,7 +41,7 @@ Project {
}
Transformer {
- Artifact { fileName: "generated.txt" }
+ Artifact { filePath: "generated.txt" }
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "generating " + output.filePath;
diff --git a/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs b/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs
index d704ab385..2944198f3 100644
--- a/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs
+++ b/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs
@@ -27,7 +27,7 @@ DynamicLibrary {
condition: Qt.core.versionMajor >= 5
inputs: ["echoplugin.json.source"]
Artifact {
- fileName: "echoplugin.json"
+ filePath: "echoplugin.json"
fileTags: ["qt_plugin_metadata"]
}
prepare: {
diff --git a/tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_rule.qbs b/tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_rule.qbs
index 8d36c6d11..42ec452db 100644
--- a/tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_rule.qbs
+++ b/tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_rule.qbs
@@ -11,7 +11,7 @@ Product {
inputs: "input"
Artifact {
fileTags: "custom"
- fileName: "oldfile"
+ filePath: "oldfile"
}
prepare: {
var cmd = new JavaScriptCommand();
diff --git a/tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_transformer.qbs b/tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_transformer.qbs
index a36bd108f..dd4b4baed 100644
--- a/tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_transformer.qbs
+++ b/tests/auto/blackbox/testdata/rad-after-incomplete-build/project_with_transformer.qbs
@@ -6,7 +6,7 @@ Product {
Transformer {
Artifact {
fileTags: "custom"
- fileName: "oldfile"
+ filePath: "oldfile"
}
prepare: {
var cmd = new JavaScriptCommand();
diff --git a/tests/auto/blackbox/testdata/ruleCycle/ruleCycle.qbs b/tests/auto/blackbox/testdata/ruleCycle/ruleCycle.qbs
index eca5cfa76..a7a16ccc2 100644
--- a/tests/auto/blackbox/testdata/ruleCycle/ruleCycle.qbs
+++ b/tests/auto/blackbox/testdata/ruleCycle/ruleCycle.qbs
@@ -20,7 +20,7 @@ Project {
Rule {
inputs: ["cow"]
Artifact {
- fileName: input.completeBaseName + ".cow_pat"
+ filePath: input.completeBaseName + ".cow_pat"
fileTags: ["cow_pat"]
}
prepare: { print("The cow pat falls out of the cow."); }
@@ -28,7 +28,7 @@ Project {
Rule {
inputs: ["cow_pat"]
Artifact {
- fileName: input.completeBaseName + ".fertilizer"
+ filePath: input.completeBaseName + ".fertilizer"
fileTags: ["fertilizer"]
}
prepare: { print("The cow pat is used as fertilizer."); }
diff --git a/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs b/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs
index df04be64b..e173d5fb2 100644
--- a/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs
+++ b/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs
@@ -15,7 +15,7 @@ Project {
Rule {
inputs: ["foosource"]
Artifact {
- fileName: input.baseName + ".foo"
+ filePath: input.baseName + ".foo"
fileTags: ["foo"]
}
@@ -33,7 +33,7 @@ Project {
Rule {
inputs: ["foo"]
Artifact {
- fileName: input.baseName + "_foo.cpp"
+ filePath: input.baseName + "_foo.cpp"
fileTags: ["cpp"]
}
diff --git a/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs b/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs
index 8bfd66d53..521bf528d 100644
--- a/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs
+++ b/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs
@@ -15,7 +15,7 @@ Project {
Rule {
inputs: ["foosource"]
Artifact {
- fileName: input.baseName + ".foo"
+ filePath: input.baseName + ".foo"
fileTags: ["foo"]
}
@@ -33,7 +33,7 @@ Project {
Rule {
inputs: ["foo"]
Artifact {
- fileName: input.baseName + "_foo.cpp"
+ filePath: input.baseName + "_foo.cpp"
fileTags: ["cpp"]
}
diff --git a/tests/auto/blackbox/testdata/transformers/transformers.qbs b/tests/auto/blackbox/testdata/transformers/transformers.qbs
index efd5cd9ad..a0b1d70b0 100644
--- a/tests/auto/blackbox/testdata/transformers/transformers.qbs
+++ b/tests/auto/blackbox/testdata/transformers/transformers.qbs
@@ -15,7 +15,7 @@ Project {
Transformer {
// no inputs -> just a generator
Artifact {
- fileName: "foo.txt"
+ filePath: "foo.txt"
fileTags: "text"
}
prepare: {
@@ -37,7 +37,7 @@ Project {
Transformer {
// no inputs -> just a generator
Artifact {
- fileName: "foo.xml"
+ filePath: "foo.xml"
fileTags: "xml"
}
prepare: {
@@ -62,7 +62,7 @@ Project {
Transformer {
inputs: ["main.cpp"] // will be taken from the source dir
Artifact {
- fileName: "bar.txt"
+ filePath: "bar.txt"
fileTags: "text"
}
prepare: {
diff --git a/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs
index 80644232e..899b4445f 100644
--- a/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs
+++ b/tests/auto/blackbox/testdata/usings-as-sole-inputs-non-multiplexed/project.qbs
@@ -23,7 +23,7 @@ Project {
Rule {
inputs: "custom.in"
Artifact {
- fileName: FileInfo.baseName(input.filePath) + ".out"
+ filePath: FileInfo.baseName(input.filePath) + ".out"
fileTags: "custom"
}
prepare: {
@@ -45,7 +45,7 @@ Project {
Rule {
usings: "custom"
Artifact {
- fileName: FileInfo.fileName(input.filePath) + ".plus"
+ filePath: FileInfo.fileName(input.filePath) + ".plus"
fileTags: "custom-plus"
}
prepare: {