From c18922a349907af466c2f7c1f1a3251bf55bf529 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 27 Mar 2014 13:43:03 +0100 Subject: Replace deprecated construct in qbs files. "{in,out}put.fileName" -> "{in,out}put.filePath". Change-Id: Icf55489cdf2187f9f1a6f413054af1fba8025f4c Reviewed-by: Joerg Bornemann --- qbs/modules/pluginspec/pluginspec.qbs | 12 ++++++------ src/app/app_version_header.qbs | 4 ++-- tests/auto/extensionsystem/copytransformer.qbs | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/qbs/modules/pluginspec/pluginspec.qbs b/qbs/modules/pluginspec/pluginspec.qbs index f7e9127306..2b57b53d89 100644 --- a/qbs/modules/pluginspec/pluginspec.qbs +++ b/qbs/modules/pluginspec/pluginspec.qbs @@ -17,7 +17,7 @@ Module { prepare: { var cmd = new JavaScriptCommand(); - cmd.description = "prepare " + FileInfo.fileName(output.fileName); + cmd.description = "prepare " + FileInfo.fileName(output.filePath); cmd.highlight = "codegen"; cmd.pluginspecreplacements = product.pluginspecreplacements; cmd.plugin_depends = []; @@ -36,7 +36,7 @@ Module { cmd.sourceCode = function() { var i; var vars = pluginspecreplacements || {}; - var inf = new TextFile(input.fileName); + var inf = new TextFile(input.filePath); var all = inf.readAll(); // replace quoted quotes all = all.replace(/\\\"/g, '"'); @@ -58,7 +58,7 @@ Module { for (i in vars) { all = all.replace(new RegExp('\\\$\\\$' + i + '(?!\w)', 'g'), vars[i]); } - var file = new TextFile(output.fileName, TextFile.WriteOnly); + var file = new TextFile(output.filePath, TextFile.WriteOnly); file.truncate(); file.write(all); file.close(); @@ -85,12 +85,12 @@ Module { var args = [ "-no-format", "-output", - output.fileName, + output.filePath, xslFile, - input.fileName + input.filePath ]; var cmd = new Command(xmlPatternsPath, args); - cmd.description = "generating " + FileInfo.fileName(output.fileName); + cmd.description = "generating " + FileInfo.fileName(output.filePath); cmd.highlight = "codegen"; return cmd; } diff --git a/src/app/app_version_header.qbs b/src/app/app_version_header.qbs index 4908bcff4e..bd08249b47 100644 --- a/src/app/app_version_header.qbs +++ b/src/app/app_version_header.qbs @@ -18,7 +18,7 @@ Product { cmd.highlight = "codegen"; cmd.onWindows = (product.moduleProperty("qbs", "targetOS").contains("windows")); cmd.sourceCode = function() { - var file = new TextFile(input.fileName); + var file = new TextFile(input.filePath); var content = file.readAll(); // replace quoted quotes content = content.replace(/\\\"/g, '"'); @@ -30,7 +30,7 @@ Product { content = content.replace(/(\n#define IDE_VERSION_MAJOR) .+\n/, "$1 " + project.ide_version_major + "\n") content = content.replace(/(\n#define IDE_VERSION_MINOR) .+\n/, "$1 " + project.ide_version_minor + "\n") content = content.replace(/(\n#define IDE_VERSION_RELEASE) .+\n/, "$1 " + project.ide_version_release + "\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/tests/auto/extensionsystem/copytransformer.qbs b/tests/auto/extensionsystem/copytransformer.qbs index fc0d7856af..c306748a8c 100644 --- a/tests/auto/extensionsystem/copytransformer.qbs +++ b/tests/auto/extensionsystem/copytransformer.qbs @@ -13,10 +13,10 @@ Transformer { for (var index in inputs[tag]) { var artifact = inputs[tag][index]; var cmd = new JavaScriptCommand(); - cmd.sourceFile = artifact.fileName; - cmd.description = "Copying '" + cmd.sourceFile + "' to '" + output.fileName + "/'."; + cmd.sourceFile = artifact.filePath; + cmd.description = "Copying '" + cmd.sourceFile + "' to '" + output.filePath + "/'."; cmd.highlight = "codegen"; - cmd.targetFilePath = output.fileName + '/' + FileInfo.fileName(cmd.sourceFile); + cmd.targetFilePath = output.filePath + '/' + FileInfo.fileName(cmd.sourceFile); cmd.sourceCode = function() { File.copy(sourceFile, targetFilePath); } commands.push(cmd); } -- cgit v1.2.3