Commit c18922a3 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Replace deprecated construct in qbs files.



"{in,out}put.fileName" -> "{in,out}put.filePath".

Change-Id: Icf55489cdf2187f9f1a6f413054af1fba8025f4c
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent 2d8f1247
......@@ -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;
}
......
......@@ -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();
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment