From eac4bba41ed9e68dee9a019e0fedc51d220ef112 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 25 Feb 2014 15:39:22 +0100 Subject: use filePath instead of fileName where applicable This fixes the recently introduced deprecation warnings. Task-number: QBS-258 Change-Id: I10660270895ec89a1444d596922c22e9658ca3ab Reviewed-by: Christian Kandeler --- doc/reference/items/rule.qdoc | 6 ++-- doc/reference/items/transformer.qdoc | 6 ++-- share/qbs/modules/cpp/DarwinGCC.qbs | 20 ++++++------- share/qbs/modules/cpp/GenericGCC.qbs | 32 ++++++++++---------- share/qbs/modules/cpp/gcc.js | 12 ++++---- share/qbs/modules/cpp/ios-gcc.qbs | 4 +-- share/qbs/modules/cpp/msvc.js | 34 +++++++++++----------- share/qbs/modules/cpp/windows-mingw.qbs | 4 +-- share/qbs/modules/cpp/windows-msvc.qbs | 12 ++++---- share/qbs/modules/ib/IBModule.qbs | 8 ++--- share/qbs/modules/nsis/NSISModule.qbs | 10 +++---- share/qbs/modules/wix/WiXModule.qbs | 20 ++++++------- src/lib/qtprofilesetup/templates/core.qbs | 28 +++++++++--------- src/lib/qtprofilesetup/templates/gui.qbs | 4 +-- src/lib/qtprofilesetup/templates/moc.js | 2 +- tests/auto/blackbox/testdata/codegen/codegen.qbs | 4 +-- .../dependenciesProperty/dependenciesProperty.qbs | 4 +-- .../dynamicRuleOutputs/before/flexoptionsreader.js | 2 +- .../dynamicRuleOutputs/before/genlexer.qbs | 10 +++---- .../testdata/explicitlyDependsOn/project.qbs | 2 +- .../auto/blackbox/testdata/fileTagger/moc_cpp.qbs | 6 ++-- .../blackbox/testdata/productproperties/header.qbs | 2 +- .../propertyChanges/modules/TestModule/module.qbs | 2 +- .../blackbox/testdata/propertyChanges/project.qbs | 4 +-- tests/auto/blackbox/testdata/qt5plugin/plugin.qbs | 4 +-- .../ruleConditions/modules/narfzort/narfzort.qbs | 4 +-- .../testdata/trackFileTags/after/project.qbs | 4 +-- .../testdata/trackFileTags/before/project.qbs | 4 +-- .../testdata/transformers/transformers.qbs | 14 ++++----- 29 files changed, 134 insertions(+), 134 deletions(-) diff --git a/doc/reference/items/rule.qdoc b/doc/reference/items/rule.qdoc index 05fc22643..91dcc6137 100644 --- a/doc/reference/items/rule.qdoc +++ b/doc/reference/items/rule.qdoc @@ -74,12 +74,12 @@ for (i in defines) args.push('-D' + defines[i]); args.push('-c'); - args.push(input.fileName); + args.push(input.filePath); args.push('-o'); - args.push(output.fileName); + args.push(output.filePath); var compilerPath = ModUtils.moduleProperty(product, 'compilerPath'); var cmd = new Command(compilerPath, args); - cmd.description = 'compiling ' + FileInfo.fileName(input.fileName); + cmd.description = 'compiling ' + FileInfo.fileName(input.filePath); cmd.highlight = 'compiler'; return cmd; } diff --git a/doc/reference/items/transformer.qdoc b/doc/reference/items/transformer.qdoc index e133e8cbb..93e257b71 100644 --- a/doc/reference/items/transformer.qdoc +++ b/doc/reference/items/transformer.qdoc @@ -46,14 +46,14 @@ } prepare: { var cmd = new JavaScriptCommand(); - cmd.description = "Processing '" + input.fileName + "'"; + cmd.description = "Processing '" + input.filePath + "'"; cmd.highlight = "codegen"; cmd.sourceCode = function() { - var file = new TextFile(input.fileName); + var file = new TextFile(input.filePath); var content = file.readAll(); file.close() content = content.replace(/\r\n/g, "\n"); - file = new TextFile(output.fileName, TextFile.WriteOnly); + file = new TextFile(output.filePath, TextFile.WriteOnly); file.truncate(); file.write(content); file.close(); diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index 7804f521a..f9530da55 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -119,7 +119,7 @@ UnixGCC { cmd.description = "generating PkgInfo"; cmd.highlight = "codegen"; cmd.sourceCode = function() { - var infoPlist = BundleTools.infoPlistContents(inputs.infoplist[0].fileName); + var infoPlist = BundleTools.infoPlistContents(inputs.infoplist[0].filePath); var pkgType = infoPlist['CFBundlePackageType']; if (!pkgType) @@ -129,7 +129,7 @@ UnixGCC { if (!pkgSign) throw("CFBundleSignature not found in Info.plist; this should not happen"); - var pkginfo = new TextFile(outputs.pkginfo[0].fileName, TextFile.WriteOnly); + var pkginfo = new TextFile(outputs.pkginfo[0].filePath, TextFile.WriteOnly); pkginfo.write(pkgType + pkgSign); pkginfo.close(); } @@ -269,7 +269,7 @@ UnixGCC { } // Write the plist contents as JSON - var infoplist = new TextFile(outputs.infoplist[0].fileName, TextFile.WriteOnly); + var infoplist = new TextFile(outputs.infoplist[0].filePath, TextFile.WriteOnly); infoplist.write(JSON.stringify(aggregatePlist)); infoplist.close(); @@ -283,7 +283,7 @@ UnixGCC { // Convert the written file to the format appropriate for the current platform process = new Process(); - process.exec("plutil", ["-convert", infoPlistFormat, outputs.infoplist[0].fileName], true); + process.exec("plutil", ["-convert", infoPlistFormat, outputs.infoplist[0].filePath], true); process.close(); } return cmd; @@ -301,8 +301,8 @@ UnixGCC { prepare: { var cmd = new Command("dsymutil", [ - "--out=" + outputs.application_dsym[0].fileName, - input.fileName + "--out=" + outputs.application_dsym[0].filePath, + input.filePath ]); cmd.description = "generating dsym"; cmd.highlight = "codegen"; @@ -341,23 +341,23 @@ UnixGCC { prepare: { var commands = []; var cmd = new Command("ln", ["-sf", BundleTools.frameworkVersion(product), "Current"]); - cmd.workingDirectory = output.fileName + "/Versions"; + cmd.workingDirectory = output.filePath + "/Versions"; cmd.description = "creating framework " + product.targetName; cmd.highlight = "codegen"; commands.push(cmd); cmd = new Command("ln", ["-sf", "Versions/Current/Headers", "Headers"]); - cmd.workingDirectory = output.fileName; + cmd.workingDirectory = output.filePath; cmd.silent = true; commands.push(cmd); cmd = new Command("ln", ["-sf", "Versions/Current/Resources", "Resources"]); - cmd.workingDirectory = output.fileName; + cmd.workingDirectory = output.filePath; cmd.silent = true; commands.push(cmd); cmd = new Command("ln", ["-sf", "Versions/Current/" + product.targetName, product.targetName]); - cmd.workingDirectory = output.fileName; + cmd.workingDirectory = output.filePath; cmd.silent = true; commands.push(cmd); return commands; diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 0f4c2ca17..795b61155 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -102,7 +102,7 @@ CppModule { for (var i in inputs.dynamiclibrary_copy) { var lib = inputs.dynamiclibrary_copy[i] var impliedLibs = ModUtils.moduleProperties(lib, 'transitiveSOs') - var libsToAdd = [lib.fileName].concat(impliedLibs); + var libsToAdd = [lib.filePath].concat(impliedLibs); result = result.concat(libsToAdd); } result = Gcc.concatLibs([], result); @@ -112,7 +112,7 @@ CppModule { prepare: { // Actual linker command. - var libFilePath = outputs["dynamiclibrary"][0].fileName; + var libFilePath = outputs["dynamiclibrary"][0].filePath; var platformLinkerFlags = ModUtils.moduleProperties(product, 'platformLinkerFlags'); var linkerFlags = ModUtils.moduleProperties(product, 'linkerFlags'); var commands = []; @@ -136,7 +136,7 @@ CppModule { for (i in linkerFlags) args.push(linkerFlags[i]) for (i in inputs.obj) - args.push(inputs.obj[i].fileName); + args.push(inputs.obj[i].filePath); var sysroot = ModUtils.moduleProperty(product, "sysroot") if (sysroot) { if (product.moduleProperty("qbs", "targetOS").contains('darwin')) @@ -159,8 +159,8 @@ CppModule { cmd = new JavaScriptCommand(); cmd.silent = true; cmd.sourceCode = function() { - var sourceFilePath = outputs.dynamiclibrary[0].fileName; - var targetFilePath = outputs.dynamiclibrary_copy[0].fileName; + var sourceFilePath = outputs.dynamiclibrary[0].filePath; + var targetFilePath = outputs.dynamiclibrary_copy[0].filePath; if (!File.exists(targetFilePath)) { File.copy(sourceFilePath, targetFilePath); return; @@ -208,10 +208,10 @@ CppModule { var symlinkCount = links.length; for (var i = 0; i < symlinkCount; ++i) { cmd = new Command("ln", ["-sf", FileInfo.fileName(libFilePath), - links[i].fileName]); + links[i].filePath]); cmd.highlight = "filegen"; cmd.description = "creating symbolic link '" - + FileInfo.fileName(links[i].fileName) + "'"; + + FileInfo.fileName(links[i].filePath) + "'"; cmd.workingDirectory = FileInfo.path(libFilePath); commands.push(cmd); } @@ -233,7 +233,7 @@ CppModule { var result = [] for (var i in inputs.staticlibrary) { var lib = inputs.staticlibrary[i] - result.push(lib.fileName) + result.push(lib.filePath) var impliedLibs = ModUtils.moduleProperties(lib, 'staticLibraries') result = Gcc.concatLibs(result, impliedLibs); } @@ -242,17 +242,17 @@ CppModule { cpp.dynamicLibraries: { var result = [] for (var i in inputs.dynamiclibrary) - result.push(inputs.dynamiclibrary[i].fileName); + result.push(inputs.dynamiclibrary[i].filePath); return result } } prepare: { - var args = ['rcs', output.fileName]; + var args = ['rcs', output.filePath]; for (var i in inputs.obj) - args.push(inputs.obj[i].fileName); + args.push(inputs.obj[i].filePath); var cmd = new Command(ModUtils.moduleProperty(product, "archiverPath"), args); - cmd.description = 'creating ' + FileInfo.fileName(output.fileName); + cmd.description = 'creating ' + FileInfo.fileName(output.filePath); cmd.highlight = 'linker' cmd.responseFileUsagePrefix = '@'; return cmd; @@ -282,7 +282,7 @@ CppModule { var linkerFlags = ModUtils.moduleProperties(product, 'linkerFlags'); var args = Gcc.configFlags(product); for (var i in inputs.obj) - args.push(inputs.obj[i].fileName) + args.push(inputs.obj[i].filePath) var sysroot = ModUtils.moduleProperty(product, "sysroot") if (sysroot) { if (product.moduleProperty("qbs", "targetOS").contains('darwin')) @@ -318,16 +318,16 @@ CppModule { } } args.push('-o'); - args.push(output.fileName); + args.push(output.filePath); if (inputs.infoplist) { - args = args.concat(["-sectcreate", "__TEXT", "__info_plist", inputs.infoplist[0].fileName]); + args = args.concat(["-sectcreate", "__TEXT", "__info_plist", inputs.infoplist[0].filePath]); } args = args.concat(Gcc.linkerFlags(product, inputs)); args = args.concat(Gcc.additionalCompilerAndLinkerFlags(product)); var cmd = new Command(ModUtils.moduleProperty(product, "linkerPath"), args); - cmd.description = 'linking ' + FileInfo.fileName(output.fileName); + cmd.description = 'linking ' + FileInfo.fileName(output.filePath); cmd.highlight = 'linker' cmd.responseFileUsagePrefix = '@'; return cmd; diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index a44465132..cc6505d4a 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -15,11 +15,11 @@ function linkerFlags(product, inputs) // Add filenames of internal library dependencies to the lists for (i in inputs.staticlibrary) - staticLibraries.unshift(inputs.staticlibrary[i].fileName); + staticLibraries.unshift(inputs.staticlibrary[i].filePath); for (i in inputs.dynamiclibrary_copy) - dynamicLibraries.unshift(inputs.dynamiclibrary_copy[i].fileName); + dynamicLibraries.unshift(inputs.dynamiclibrary_copy[i].filePath); for (i in inputs.frameworkbundle) - frameworks.unshift(inputs.frameworkbundle[i].fileName); + frameworks.unshift(inputs.frameworkbundle[i].filePath); // Flags for library search paths if (libraryPaths) @@ -217,9 +217,9 @@ function additionalCompilerFlags(product, input, output) } args.push('-c'); - args.push(input.fileName); + args.push(input.filePath); args.push('-o'); - args.push(output.fileName); + args.push(output.filePath); return args } @@ -336,7 +336,7 @@ function prepareCompiler(project, product, inputs, outputs, input, output) } var cmd = new Command(compilerPath, args); - cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.fileName); + cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.filePath); if (pchOutput) cmd.description += ' (' + tag + ')'; cmd.highlight = "compiler"; diff --git a/share/qbs/modules/cpp/ios-gcc.qbs b/share/qbs/modules/cpp/ios-gcc.qbs index 02af5b6d9..626995653 100644 --- a/share/qbs/modules/cpp/ios-gcc.qbs +++ b/share/qbs/modules/cpp/ios-gcc.qbs @@ -37,7 +37,7 @@ DarwinGCC { cmd.highlight = "codegen"; cmd.sysroot = product.moduleProperty("qbs","sysroot"); cmd.sourceCode = function() { - File.copy(sysroot + "/ResourceRules.plist", outputs.resourcerules[0].fileName); + File.copy(sysroot + "/ResourceRules.plist", outputs.resourcerules[0].filePath); } return cmd; } @@ -66,7 +66,7 @@ DarwinGCC { var args = ["-sdk", product.moduleProperty("cpp", "xcodeSdkName"), "PackageApplication", "-v", product.buildDirectory + "/" + BundleTools.wrapperName(product), - "-o", outputs.ipa[0].fileName, "--sign", signingIdentity, + "-o", outputs.ipa[0].filePath, "--sign", signingIdentity, "--embed", provisioningProfile]; var command = "/usr/bin/xcrun"; diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index 0df17a25e..9208540e0 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -57,8 +57,8 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl } var objOutput = outputs.obj ? outputs.obj[0] : undefined - args.push('/Fo' + FileInfo.toWindowsSeparators(objOutput.fileName)) - args.push(FileInfo.toWindowsSeparators(input.fileName)) + args.push('/Fo' + FileInfo.toWindowsSeparators(objOutput.filePath)) + args.push(FileInfo.toWindowsSeparators(input.filePath)) var prefixHeaders = ModUtils.moduleProperty(product, "prefixHeaders"); for (i in prefixHeaders) @@ -76,9 +76,9 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl if (pchOutput) { // create PCH args.push("/Yc"); - args.push("/Fp" + FileInfo.toWindowsSeparators(pchOutput.fileName)); - args.push("/Fo" + FileInfo.toWindowsSeparators(objOutput.fileName)); - args.push(FileInfo.toWindowsSeparators(input.fileName)); + args.push("/Fp" + FileInfo.toWindowsSeparators(pchOutput.filePath)); + args.push("/Fo" + FileInfo.toWindowsSeparators(objOutput.filePath)); + args.push(FileInfo.toWindowsSeparators(input.filePath)); } else { // use PCH var pchHeaderName = FileInfo.toWindowsSeparators(pch); @@ -103,7 +103,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl args = wrapperArgs.concat(args); } var cmd = new Command(compilerPath, args) - cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.fileName); + cmd.description = (pchOutput ? 'pre' : '') + 'compiling ' + FileInfo.fileName(input.filePath); if (pchOutput) cmd.description += ' (' + tag + ')'; cmd.highlight = "compiler"; @@ -112,7 +112,7 @@ function prepareCompiler(product, input, outputs, platformDefines, defines, incl // cl.exe outputs the cpp file name. We filter that out. cmd.stdoutFilterFunction = "function(output) {"; cmd.stdoutFilterFunction += "return output.replace(/" - + FileInfo.fileName(input.fileName) + "\\r\\n/g, '');"; + + FileInfo.fileName(input.filePath) + "\\r\\n/g, '');"; cmd.stdoutFilterFunction += "}"; return cmd; } @@ -128,7 +128,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, var args = ['/nologo'] if (linkDLL) { args.push('/DLL'); - args.push('/IMPLIB:' + FileInfo.toWindowsSeparators(outputs.dynamiclibrary_import[0].fileName)); + args.push('/IMPLIB:' + FileInfo.toWindowsSeparators(outputs.dynamiclibrary_import[0].filePath)); } if (debugInformation) @@ -162,19 +162,19 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, if (generateManifestFiles) { linkerOutputNativeFilePath = FileInfo.toWindowsSeparators( - FileInfo.path(primaryOutput.fileName) + "/intermediate." - + FileInfo.fileName(primaryOutput.fileName)); + FileInfo.path(primaryOutput.filePath) + "/intermediate." + + FileInfo.fileName(primaryOutput.filePath)); manifestFileName = linkerOutputNativeFilePath + ".manifest"; args.push('/MANIFEST', '/MANIFESTFILE:' + manifestFileName) } else { - linkerOutputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.fileName); + linkerOutputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.filePath); } var allInputs = inputs.obj.concat(inputs.staticlibrary || []) if (inputs.dynamiclibrary_import) allInputs = allInputs.concat(inputs.dynamiclibrary_import); for (i in allInputs) { - var fileName = FileInfo.toWindowsSeparators(allInputs[i].fileName) + var fileName = FileInfo.toWindowsSeparators(allInputs[i].filePath) args.push(fileName) } for (i in staticLibraries) { @@ -200,9 +200,9 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, var commands = []; var cmd = new Command(product.moduleProperty("cpp", "linkerPath"), args) - cmd.description = 'linking ' + FileInfo.fileName(primaryOutput.fileName) + cmd.description = 'linking ' + FileInfo.fileName(primaryOutput.filePath) cmd.highlight = 'linker'; - cmd.workingDirectory = FileInfo.path(primaryOutput.fileName) + cmd.workingDirectory = FileInfo.path(primaryOutput.filePath) cmd.responseFileUsagePrefix = '@'; cmd.stdoutFilterFunction = function(output) @@ -212,7 +212,7 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, commands.push(cmd); if (generateManifestFiles) { - var outputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.fileName); + var outputNativeFilePath = FileInfo.toWindowsSeparators(primaryOutput.filePath); cmd = new JavaScriptCommand(); cmd.src = linkerOutputNativeFilePath; cmd.dst = outputNativeFilePath; @@ -226,9 +226,9 @@ function prepareLinker(product, inputs, outputs, libraryPaths, dynamicLibraries, "/outputresource:" + outputNativeFilePath + ";#" + (linkDLL ? "2" : "1") ] cmd = new Command("mt.exe", args) - cmd.description = 'embedding manifest into ' + FileInfo.fileName(primaryOutput.fileName) + cmd.description = 'embedding manifest into ' + FileInfo.fileName(primaryOutput.filePath) cmd.highlight = 'linker'; - cmd.workingDirectory = FileInfo.path(primaryOutput.fileName) + cmd.workingDirectory = FileInfo.path(primaryOutput.filePath) commands.push(cmd); } diff --git a/share/qbs/modules/cpp/windows-mingw.qbs b/share/qbs/modules/cpp/windows-mingw.qbs index 72172328e..5e6fb40ae 100644 --- a/share/qbs/modules/cpp/windows-mingw.qbs +++ b/share/qbs/modules/cpp/windows-mingw.qbs @@ -68,9 +68,9 @@ GenericGCC { args.push(systemIncludePaths[i]); } - args = args.concat(['-i', input.fileName, '-o', output.fileName]); + args = args.concat(['-i', input.filePath, '-o', output.filePath]); var cmd = new Command(ModUtils.moduleProperty(product, "windresPath"), args); - cmd.description = 'compiling ' + FileInfo.fileName(input.fileName); + cmd.description = 'compiling ' + FileInfo.fileName(input.filePath); cmd.highlight = 'compiler'; return cmd; } diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs index 0137970d1..4e74ad034 100644 --- a/share/qbs/modules/cpp/windows-msvc.qbs +++ b/share/qbs/modules/cpp/windows-msvc.qbs @@ -217,16 +217,16 @@ CppModule { prepare: { var args = ['/nologo'] - var nativeOutputFileName = FileInfo.toWindowsSeparators(output.fileName) + var nativeOutputFileName = FileInfo.toWindowsSeparators(output.filePath) args.push('/OUT:' + nativeOutputFileName) for (var i in inputs.obj) { - var fileName = FileInfo.toWindowsSeparators(inputs.obj[i].fileName) + var fileName = FileInfo.toWindowsSeparators(inputs.obj[i].filePath) args.push(fileName) } var cmd = new Command("lib.exe", args); - cmd.description = 'creating ' + FileInfo.fileName(output.fileName) + cmd.description = 'creating ' + FileInfo.fileName(output.filePath) cmd.highlight = 'linker'; - cmd.workingDirectory = FileInfo.path(output.fileName) + cmd.workingDirectory = FileInfo.path(output.filePath) cmd.responseFileUsagePrefix = '@'; return cmd; } @@ -269,9 +269,9 @@ CppModule { args.push(systemIncludePaths[i]); } - args = args.concat(['/fo', output.fileName, input.fileName]); + args = args.concat(['/fo', output.filePath, input.filePath]); var cmd = new Command('rc', args); - cmd.description = 'compiling ' + FileInfo.fileName(input.fileName); + cmd.description = 'compiling ' + FileInfo.fileName(input.filePath); cmd.highlight = 'compiler'; // Remove the first two lines of stdout. That's the logo. diff --git a/share/qbs/modules/ib/IBModule.qbs b/share/qbs/modules/ib/IBModule.qbs index a9f9c1b6e..d6e8c6c2e 100644 --- a/share/qbs/modules/ib/IBModule.qbs +++ b/share/qbs/modules/ib/IBModule.qbs @@ -118,14 +118,14 @@ Module { } args.push("--compile"); - args.push(output.fileName); - args.push(input.fileName); + args.push(output.filePath); + args.push(input.filePath); var cmd = new Command("ibtool", args); - cmd.description = 'ibtool ' + FileInfo.fileName(input.fileName); + cmd.description = 'ibtool ' + FileInfo.fileName(input.filePath); // Also display the language name of the XIB being compiled if it has one - var localizationKey = DarwinTools.localizationKey(input.fileName); + var localizationKey = DarwinTools.localizationKey(input.filePath); if (localizationKey) cmd.description += ' (' + localizationKey + ')'; diff --git a/share/qbs/modules/nsis/NSISModule.qbs b/share/qbs/modules/nsis/NSISModule.qbs index 77a72436b..f0756178e 100755 --- a/share/qbs/modules/nsis/NSISModule.qbs +++ b/share/qbs/modules/nsis/NSISModule.qbs @@ -180,21 +180,21 @@ Module { var inputFileNames = []; for (i in inputs.nsi) { - inputFileNames.push(FileInfo.fileName(inputs.nsi[i].fileName)); + inputFileNames.push(FileInfo.fileName(inputs.nsi[i].filePath)); if (product.moduleProperty("qbs", "hostOS").contains("windows")) { - args.push(FileInfo.toWindowsSeparators(inputs.nsi[i].fileName)); + args.push(FileInfo.toWindowsSeparators(inputs.nsi[i].filePath)); } else { - args.push(inputs.nsi[i].fileName); + args.push(inputs.nsi[i].filePath); } } // Output file name - this goes last to override any OutFile command in the script - args.push(opt + "XOutFile " + output.fileName); + args.push(opt + "XOutFile " + output.filePath); var cmd = new Command(ModUtils.moduleProperty(product, "compilerPath"), args); cmd.description = "compiling " + inputFileNames.join(", "); cmd.highlight = "compiler"; - cmd.workingDirectory = FileInfo.path(output.fileName); + cmd.workingDirectory = FileInfo.path(output.filePath); return cmd; } } diff --git a/share/qbs/modules/wix/WiXModule.qbs b/share/qbs/modules/wix/WiXModule.qbs index c5c405578..a824a1e69 100644 --- a/share/qbs/modules/wix/WiXModule.qbs +++ b/share/qbs/modules/wix/WiXModule.qbs @@ -266,7 +266,7 @@ Module { } args.push("-out"); - args.push(FileInfo.toWindowsSeparators(output.fileName)); + args.push(FileInfo.toWindowsSeparators(output.filePath)); args.push("-arch"); args.push(arch); @@ -276,12 +276,12 @@ Module { args.push(extensions[i]); } - args.push(FileInfo.toWindowsSeparators(inputs.wxs[0].fileName)); + args.push(FileInfo.toWindowsSeparators(inputs.wxs[0].filePath)); var cmd = new Command(ModUtils.moduleProperty(product, "compilerPath"), args); - cmd.description = "compiling " + FileInfo.fileName(inputs.wxs[0].fileName); + cmd.description = "compiling " + FileInfo.fileName(inputs.wxs[0].filePath); cmd.highlight = "compiler"; - cmd.workingDirectory = FileInfo.path(output.fileName); + cmd.workingDirectory = FileInfo.path(output.filePath); return cmd; } } @@ -339,11 +339,11 @@ Module { } args.push("-out"); - args.push(FileInfo.toWindowsSeparators(primaryOutput.fileName)); + args.push(FileInfo.toWindowsSeparators(primaryOutput.filePath)); if (ModUtils.moduleProperty(product, "debugInformation")) { args.push("-pdbout"); - args.push(FileInfo.toWindowsSeparators(outputs.wixpdb[0].fileName)); + args.push(FileInfo.toWindowsSeparators(outputs.wixpdb[0].filePath)); } else { args.push("-spdb"); } @@ -356,7 +356,7 @@ Module { for (i in inputs.wxl) { args.push("-loc"); - args.push(outputs.wxl[i].fileName); + args.push(outputs.wxl[i].filePath); } if (product.type.contains("msi")) { @@ -371,13 +371,13 @@ Module { } for (i in inputs.wixobj) { - args.push(inputs.wixobj[i].fileName); + args.push(inputs.wixobj[i].filePath); } var cmd = new Command(ModUtils.moduleProperty(product, "linkerPath"), args); - cmd.description = "linking " + FileInfo.fileName(input.fileName); + cmd.description = "linking " + FileInfo.fileName(input.filePath); cmd.highlight = "linker"; - cmd.workingDirectory = FileInfo.path(primaryOutput.fileName); + cmd.workingDirectory = FileInfo.path(primaryOutput.filePath); return cmd; } } diff --git a/src/lib/qtprofilesetup/templates/core.qbs b/src/lib/qtprofilesetup/templates/core.qbs index 3199e0db5..0d706b255 100644 --- a/src/lib/qtprofilesetup/templates/core.qbs +++ b/src/lib/qtprofilesetup/templates/core.qbs @@ -227,8 +227,8 @@ Module { } prepare: { var cmd = new Command(Moc.fullPath(product), - Moc.args(product, input, output.fileName)); - cmd.description = 'moc ' + FileInfo.fileName(input.fileName); + Moc.args(product, input, output.filePath)); + cmd.description = 'moc ' + FileInfo.fileName(input.filePath); cmd.highlight = 'codegen'; return cmd; } @@ -244,10 +244,10 @@ Module { } prepare: { var cmd = new Command(ModUtils.moduleProperty(product, "binPath") + '/rcc', - [input.fileName, '-name', - FileInfo.completeBaseName(input.fileName), - '-o', output.fileName]); - cmd.description = 'rcc ' + FileInfo.fileName(input.fileName); + [input.filePath, '-name', + FileInfo.completeBaseName(input.filePath), + '-o', output.filePath]); + cmd.description = 'rcc ' + FileInfo.fileName(input.filePath); cmd.highlight = 'codegen'; return cmd; } @@ -265,8 +265,8 @@ Module { prepare: { var cmd = new Command(ModUtils.moduleProperty(product, "binPath") + '/' + ModUtils.moduleProperty(product, "lreleaseName"), - ['-silent', input.fileName, '-qm', output.fileName]); - cmd.description = 'lrelease ' + FileInfo.fileName(input.fileName); + ['-silent', input.filePath, '-qm', output.filePath]); + cmd.description = 'lrelease ' + FileInfo.fileName(input.filePath); cmd.highlight = 'filegen'; return cmd; } @@ -288,8 +288,8 @@ Module { } prepare: { - var outputDir = outputs["qdoc-html"][0].fileName; - var args = [input.fileName]; + var outputDir = outputs["qdoc-html"][0].filePath; + var args = [input.filePath]; var qtVersion = ModUtils.moduleProperty(product, "versionMajor"); if (qtVersion >= 5) { args.push("-outputdir"); @@ -297,7 +297,7 @@ Module { } var cmd = new Command(ModUtils.moduleProperty(product, "binPath") + '/' + ModUtils.moduleProperty(product, "qdocName"), args); - cmd.description = 'qdoc ' + FileInfo.fileName(input.fileName); + cmd.description = 'qdoc ' + FileInfo.fileName(input.filePath); cmd.highlight = 'filegen'; cmd.environment = ModUtils.moduleProperty(product, "qdocEnvironment"); cmd.environment.push("OUTDIR=" + outputDir); // Qt 4 replacement for -outputdir @@ -315,13 +315,13 @@ Module { } prepare: { - var args = [input.fileName]; + var args = [input.filePath]; args = args.concat(ModUtils.moduleProperty(product, "helpGeneratorArgs")); args.push("-o"); - args.push(output.fileName); + args.push(output.filePath); var cmd = new Command(ModUtils.moduleProperty(product, "binPath") + "/qhelpgenerator", args); - cmd.description = 'qhelpgenerator ' + FileInfo.fileName(input.fileName); + cmd.description = 'qhelpgenerator ' + FileInfo.fileName(input.filePath); cmd.highlight = 'filegen'; return cmd; } diff --git a/src/lib/qtprofilesetup/templates/gui.qbs b/src/lib/qtprofilesetup/templates/gui.qbs index ed04bde41..02b90f40c 100644 --- a/src/lib/qtprofilesetup/templates/gui.qbs +++ b/src/lib/qtprofilesetup/templates/gui.qbs @@ -25,8 +25,8 @@ QtModule { prepare: { var cmd = new Command(ModUtils.moduleProperty(product, "binPath") + '/' + ModUtils.moduleProperty(product, "uicName"), - [input.fileName, '-o', output.fileName]) - cmd.description = 'uic ' + FileInfo.fileName(input.fileName); + [input.filePath, '-o', output.filePath]) + cmd.description = 'uic ' + FileInfo.fileName(input.filePath); cmd.highlight = 'codegen'; return cmd; } diff --git a/src/lib/qtprofilesetup/templates/moc.js b/src/lib/qtprofilesetup/templates/moc.js index e2f278491..d81bb456f 100644 --- a/src/lib/qtprofilesetup/templates/moc.js +++ b/src/lib/qtprofilesetup/templates/moc.js @@ -37,7 +37,7 @@ function args(product, input, outputFileName) defines.map(function(item) { return '-D' + item; }), includePaths.map(function(item) { return '-I' + item; }), '-o', outputFileName, - input.fileName); + input.filePath); return args; } diff --git a/tests/auto/blackbox/testdata/codegen/codegen.qbs b/tests/auto/blackbox/testdata/codegen/codegen.qbs index bb71a5540..1a05ad4f0 100644 --- a/tests/auto/blackbox/testdata/codegen/codegen.qbs +++ b/tests/auto/blackbox/testdata/codegen/codegen.qbs @@ -54,7 +54,7 @@ Project { var code = '$NUMBERTYPE $FUNCTIONNAME($NUMBERTYPE, $STRINGTYPE) { return 0; }'; code = expandMacros(code, product.replacements); - var args = ['echo ' + code + '>' + output.fileName] + var args = ['echo ' + code + '>' + output.filePath] var cmd if (product.moduleProperty("qbs", "hostOS").contains('windows')) { cmd = new Command('cmd.exe', ['/C'].concat(args)); @@ -64,7 +64,7 @@ Project { args[0] = args[0].replace(/;/g, '\\;') cmd = new Command('/bin/sh', ['-c'].concat(args)) } - cmd.description = 'generate\t' + FileInfo.fileName(output.fileName); + cmd.description = 'generate\t' + FileInfo.fileName(output.filePath); cmd.highlight = 'codegen'; return cmd; } diff --git a/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs b/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs index 052829c1b..a5ff12eb2 100644 --- a/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs +++ b/tests/auto/blackbox/testdata/dependenciesProperty/dependenciesProperty.qbs @@ -14,11 +14,11 @@ Project { } prepare: { var cmd = new JavaScriptCommand(); - cmd.description = 'generate ' + FileInfo.fileName(output.fileName); + cmd.description = 'generate ' + FileInfo.fileName(output.filePath); cmd.highlight = 'codegen'; cmd.content = JSON.stringify(product.dependencies); cmd.sourceCode = function() { - file = new TextFile(output.fileName, TextFile.WriteOnly); + file = new TextFile(output.filePath, TextFile.WriteOnly); file.truncate(); file.write(content); file.close(); diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js index 232e8338f..f7577c773 100644 --- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js +++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/flexoptionsreader.js @@ -82,7 +82,7 @@ function readFlexOptions(filePath) } } - var tf = new TextFile(input.fileName); + var tf = new TextFile(input.filePath); var line; var optrex = /^%option\s+(.*$)/; var res; diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs index b822e852e..bb1bcb03f 100644 --- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs +++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs @@ -55,7 +55,7 @@ Project { inputs: ["flex"] outputFileTags: ["c", "hpp"] outputArtifacts: { - var options = FlexOptionsReader.readFlexOptions(input.fileName); + var options = FlexOptionsReader.readFlexOptions(input.filePath); var sourceFileName = options["outfile"] || "lex.yy.c"; var headerFileName = options["header-file"]; var result = [{ @@ -74,13 +74,13 @@ Project { var cmd; if (product.isFlexAvailable) { // flex is available. Let's call it. - cmd = new Command("flex", [input.fileName]); + cmd = new Command("flex", [input.filePath]); cmd.workingDirectory = product.buildDirectory + "/GeneratedFiles/" + product.name; } else { // No flex available here, generate some C source and header. cmd = new JavaScriptCommand(); - cmd.sourceFileName = outputs["c"][0].fileName; - cmd.headerFileName = outputs["hpp"] ? outputs["hpp"][0].fileName : ""; + cmd.sourceFileName = outputs["c"][0].filePath; + cmd.headerFileName = outputs["hpp"] ? outputs["hpp"][0].filePath : ""; cmd.sourceCode = function() { var fsrc = new TextFile(sourceFileName, TextFile.WriteOnly); if (headerFileName) { @@ -94,7 +94,7 @@ Project { fsrc.close(); }; } - cmd.description = "flexing " + FileInfo.fileName(input.fileName); + cmd.description = "flexing " + FileInfo.fileName(input.filePath); return cmd; } } diff --git a/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs b/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs index 12ae1bd7e..57172a442 100644 --- a/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs +++ b/tests/auto/blackbox/testdata/explicitlyDependsOn/project.qbs @@ -19,7 +19,7 @@ Product { cmd.description = "Creating output artifact"; cmd.highlight = "codegen"; cmd.sourceCode = function() { - var file = new TextFile(output.fileName, TextFile.WriteOnly); + var file = new TextFile(output.filePath, TextFile.WriteOnly); file.truncate(); file.close(); } diff --git a/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs b/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs index 2bc02e23c..c9d64c8bb 100644 --- a/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs +++ b/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs @@ -26,15 +26,15 @@ Project { prepare: { var cmd = new JavaScriptCommand(); cmd.sourceCode = function () { - var file = new TextFile(input.fileName, TextFile.ReadOnly); + var file = new TextFile(input.filePath, TextFile.ReadOnly); var text = file.readAll(); file.close(); - file = new TextFile(output.fileName, TextFile.WriteOnly); + file = new TextFile(output.filePath, TextFile.WriteOnly); file.truncate(); file.write(text); file.close(); } - cmd.description = 'generating ' + FileInfo.fileName(output.fileName); + cmd.description = 'generating ' + FileInfo.fileName(output.filePath); cmd.highlight = 'codegen'; return cmd; } diff --git a/tests/auto/blackbox/testdata/productproperties/header.qbs b/tests/auto/blackbox/testdata/productproperties/header.qbs index 51757b29e..56ad8fc78 100644 --- a/tests/auto/blackbox/testdata/productproperties/header.qbs +++ b/tests/auto/blackbox/testdata/productproperties/header.qbs @@ -18,7 +18,7 @@ Product { cmd.highlight = "codegen"; cmd.blubbProp = product.blubbProp; cmd.sourceCode = function() { - file = new TextFile(output.fileName, TextFile.WriteOnly); + file = new TextFile(output.filePath, TextFile.WriteOnly); file.truncate(); file.write("#define BLUBB_PROP " + blubbProp); file.close(); diff --git a/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs b/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs index e1ab9bddc..1c3e363c9 100644 --- a/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs +++ b/tests/auto/blackbox/testdata/propertyChanges/modules/TestModule/module.qbs @@ -20,7 +20,7 @@ Module { cmd.description = "Making output from input"; cmd.sourceCode = function() { // print('Change in source code'); - File.copy(input.fileName, output.fileName); + File.copy(input.filePath, output.filePath); } return cmd; } diff --git a/tests/auto/blackbox/testdata/propertyChanges/project.qbs b/tests/auto/blackbox/testdata/propertyChanges/project.qbs index 0cba4f630..f6a48e1d4 100644 --- a/tests/auto/blackbox/testdata/propertyChanges/project.qbs +++ b/tests/auto/blackbox/testdata/propertyChanges/project.qbs @@ -44,10 +44,10 @@ Project { Artifact { fileName: "generated.txt" } prepare: { var cmd = new JavaScriptCommand(); - cmd.description = "generating " + output.fileName; + cmd.description = "generating " + output.filePath; cmd.highlight = "codegen"; cmd.sourceCode = function() { - file = new TextFile(output.fileName, TextFile.WriteOnly); + file = new TextFile(output.filePath, TextFile.WriteOnly); file.truncate(); file.write(product.fileContentPrefix + "contents 1" + project.fileContentSuffix); diff --git a/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs b/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs index 121453d0b..d704ab385 100644 --- a/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs +++ b/tests/auto/blackbox/testdata/qt5plugin/plugin.qbs @@ -32,9 +32,9 @@ DynamicLibrary { } prepare: { var cmd = new JavaScriptCommand(); - cmd.description = "generating " + FileInfo.fileName(output.fileName); + cmd.description = "generating " + FileInfo.fileName(output.filePath); cmd.sourceCode = function() { - File.copy(input.fileName, output.fileName); + File.copy(input.filePath, output.filePath); } return cmd; } diff --git a/tests/auto/blackbox/testdata/ruleConditions/modules/narfzort/narfzort.qbs b/tests/auto/blackbox/testdata/ruleConditions/modules/narfzort/narfzort.qbs index b29fb55ec..8e7989573 100644 --- a/tests/auto/blackbox/testdata/ruleConditions/modules/narfzort/narfzort.qbs +++ b/tests/auto/blackbox/testdata/ruleConditions/modules/narfzort/narfzort.qbs @@ -18,9 +18,9 @@ Module { }] prepare: { var cmd = new JavaScriptCommand(); - cmd.description = "generating " + FileInfo.fileName(output.fileName); + cmd.description = "generating " + FileInfo.fileName(output.filePath); cmd.sourceCode = function() { - var f = new TextFile(output.fileName, TextFile.WriteOnly); + var f = new TextFile(output.filePath, TextFile.WriteOnly); f.write("NARF! ZORT!"); f.close(); } diff --git a/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs b/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs index e770c6212..df04be64b 100644 --- a/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs +++ b/tests/auto/blackbox/testdata/trackFileTags/after/project.qbs @@ -21,7 +21,7 @@ Project { prepare: { var cmd = new JavaScriptCommand(); - cmd.sourceCode = "var file = new TextFile(output.fileName, TextFile.WriteOnly);"; + cmd.sourceCode = "var file = new TextFile(output.filePath, TextFile.WriteOnly);"; cmd.sourceCode += "file.truncate();" cmd.sourceCode += "file.write(\"There's nothing to see here!\");" cmd.sourceCode += "file.close();" @@ -39,7 +39,7 @@ Project { prepare: { var cmd = new JavaScriptCommand(); - cmd.sourceCode = "var file = new TextFile(output.fileName, TextFile.WriteOnly);"; + cmd.sourceCode = "var file = new TextFile(output.filePath, TextFile.WriteOnly);"; cmd.sourceCode += "file.truncate();"; cmd.sourceCode += "file.write(\"// There's nothing to see here!\\n\");"; cmd.sourceCode += "file.write(\"int foo() { return 15; }\\n\");"; diff --git a/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs b/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs index dbe4df6c3..8bfd66d53 100644 --- a/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs +++ b/tests/auto/blackbox/testdata/trackFileTags/before/project.qbs @@ -21,7 +21,7 @@ Project { prepare: { var cmd = new JavaScriptCommand(); - cmd.sourceCode = "var file = new TextFile(output.fileName, TextFile.WriteOnly);"; + cmd.sourceCode = "var file = new TextFile(output.filePath, TextFile.WriteOnly);"; cmd.sourceCode += "file.truncate();" cmd.sourceCode += "file.write(\"There's nothing to see here!\");" cmd.sourceCode += "file.close();" @@ -39,7 +39,7 @@ Project { prepare: { var cmd = new JavaScriptCommand(); - cmd.sourceCode = "var file = new TextFile(output.fileName, TextFile.WriteOnly);"; + cmd.sourceCode = "var file = new TextFile(output.filePath, TextFile.WriteOnly);"; cmd.sourceCode += "file.truncate();"; cmd.sourceCode += "file.write(\"// There's nothing to see here!\\n\");"; cmd.sourceCode += "file.write(\"int foo() { return 15; }\\n\");"; diff --git a/tests/auto/blackbox/testdata/transformers/transformers.qbs b/tests/auto/blackbox/testdata/transformers/transformers.qbs index 7445bea15..efd5cd9ad 100644 --- a/tests/auto/blackbox/testdata/transformers/transformers.qbs +++ b/tests/auto/blackbox/testdata/transformers/transformers.qbs @@ -23,8 +23,8 @@ Project { cmd.description = "generating foo.txt"; cmd.highlight = "linker"; cmd.sourceCode = function () { - File.remove(output.fileName); - var f = new TextFile(output.fileName, TextFile.WriteOnly); + File.remove(output.filePath); + var f = new TextFile(output.filePath, TextFile.WriteOnly); f.write("Dear Sir/Madam,\n\n"); f.write("this is a generated file.\n\n\n"); f.write("Best Regards and Mellow Greetings,\nYour Build Tool.\n"); @@ -45,7 +45,7 @@ Project { cmd.description = "generating foo.xml"; cmd.highlight = "linker"; cmd.sourceCode = function () { - File.remove(output.fileName); + File.remove(output.filePath); var doc = new XmlDomDocument(); var root = doc.createElement("root"); doc.appendChild(root); @@ -53,7 +53,7 @@ Project { var tag = doc.createElement("Greeting"); root.appendChild(tag); tag.appendChild(doc.createTextNode("text node")); - doc.save(output.fileName); + doc.save(output.filePath); } return cmd; } @@ -69,10 +69,10 @@ Project { var cmd = new JavaScriptCommand(); cmd.description = "generating bar.txt"; cmd.highlight = "linker"; - cmd.inputFileName = input.fileName; + cmd.inputFileName = input.filePath; cmd.sourceCode = function() { - File.remove(output.fileName); - var f = new TextFile(output.fileName, TextFile.WriteOnly); + File.remove(output.filePath); + var f = new TextFile(output.filePath, TextFile.WriteOnly); f.write("Dear Sir/Madam,\n\n"); f.write("this file was generated from " + inputFileName + ".\n\n\n"); f.write("Best Regards and Mellow Greetings,\nYour Build Tool.\n"); -- cgit v1.2.3