Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit ebee5a8

Browse files
committed
Merge branch 'develop'
2 parents dfffe1c + ac431c8 commit ebee5a8

3 files changed

Lines changed: 22 additions & 23 deletions

File tree

modules/LiriTranslations/LiriTranslations.qbs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,8 @@ Module {
3030
var cmd = new JavaScriptCommand();
3131
cmd.description = "merge translations of " + input.filePath;
3232
cmd.highlight = "filegen";
33-
cmd.input = input;
33+
cmd.inputFilePath = input.filePath;
3434
cmd.sourceCode = function() {
35-
// Read original desktop entry
36-
var file = new TextFile(input.filePath, TextFile.ReadOnly);
37-
var contents = file.readAll();
38-
file.close();
39-
4035
// Collect translations
4136
var translations = "";
4237
for (var j in inputs["liri.desktop.translations"]) {
@@ -45,15 +40,15 @@ Module {
4540
while (!file.atEof()) {
4641
var line = file.readLine();
4742
var re = /\w+\[\w+\]=/
48-
if (line.match(re))
43+
if (line.match(re) && !line.startsWith("Icon"))
4944
translations += line + "\n";
5045
}
5146
file.close();
5247
}
5348

5449
// Replace marker with translations
5550
var contents = "";
56-
var file = new TextFile(input.filePath, TextFile.ReadOnly);
51+
var file = new TextFile(inputFilePath, TextFile.ReadOnly);
5752
while (!file.atEof()) {
5853
var line = file.readLine();
5954
var re = /#TRANSLATIONS/;

modules/WaylandScanner/scanner.js

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ function createCommands(product, type, input, outputs)
1010
hppCmd.description = "wayland-scanner " + input.fileName + " -> " + hppOutput.fileName;
1111
hppCmd.highlight = "codegen";
1212
hppCmd.exe = waylandScanner;
13-
hppCmd.hppOutput = hppOutput;
13+
hppCmd.inputFilePath = input.filePath;
14+
hppCmd.outputFilePath = hppOutput.filePath;
1415
hppCmd.type = type === "client" ? "client-header" : "server-header";
1516
hppCmd.sourceCode = function() {
1617
var p = new Process();
1718
try {
1819
p.setEnv("LC_ALL", "C");
19-
p.setWorkingDirectory(FileInfo.path(hppOutput.filePath));
20-
var hppArgs = [type, input.filePath, hppOutput.filePath];
20+
p.setWorkingDirectory(FileInfo.path(outputFilePath));
21+
var hppArgs = [type, inputFilePath, outputFilePath];
2122
p.exec(exe, hppArgs, true);
2223
} finally {
2324
p.close();
@@ -29,13 +30,14 @@ function createCommands(product, type, input, outputs)
2930
cppCmd.description = "wayland-scanner " + input.fileName + " -> " + cppOutput.fileName;
3031
cppCmd.highlight = "codegen";
3132
cppCmd.exe = waylandScanner;
32-
cppCmd.cppOutput = cppOutput;
33+
cppCmd.inputFilePath = input.filePath;
34+
cppCmd.outputFilePath = cppOutput.filePath;
3335
cppCmd.sourceCode = function() {
3436
var p = new Process();
3537
try {
3638
p.setEnv("LC_ALL", "C");
37-
p.setWorkingDirectory(FileInfo.path(cppOutput.filePath));
38-
var cppArgs = ["code", input.filePath, cppOutput.filePath];
39+
p.setWorkingDirectory(FileInfo.path(outputFilePath));
40+
var cppArgs = ["code", inputFilePath, outputFilePath];
3941
p.exec(exe, cppArgs, true);
4042
} finally {
4143
p.close();
@@ -54,16 +56,17 @@ function createQtCommands(product, type, input, outputs)
5456
hppCmd.description = "qtwaylandscanner " + input.fileName + " -> " + hppOutput.fileName;
5557
hppCmd.highlight = "codegen";
5658
hppCmd.exe = qtwaylandScanner;
57-
hppCmd.hppOutput = hppOutput;
59+
hppCmd.inputFilePath = input.filePath;
60+
hppCmd.outputFilePath = hppOutput.filePath;
5861
hppCmd.type = type === "client" ? "client-header" : "server-header";
5962
hppCmd.sourceCode = function() {
6063
var p = new Process();
6164
try {
6265
p.setEnv("LC_ALL", "C");
63-
p.setWorkingDirectory(FileInfo.path(hppOutput.filePath));
64-
var hppArgs = [type, input.filePath, ""];
66+
p.setWorkingDirectory(FileInfo.path(outputFilePath));
67+
var hppArgs = [type, inputFilePath, ""];
6568
p.exec(exe, hppArgs, true);
66-
var file = new TextFile(hppOutput.filePath, TextFile.WriteOnly);
69+
var file = new TextFile(outputFilePath, TextFile.WriteOnly);
6770
file.write(p.readStdOut());
6871
file.close();
6972
} finally {
@@ -76,16 +79,17 @@ function createQtCommands(product, type, input, outputs)
7679
cppCmd.description = "qtwaylandscanner " + input.fileName + " -> " + cppOutput.fileName;
7780
cppCmd.highlight = "codegen";
7881
cppCmd.exe = qtwaylandScanner;
79-
cppCmd.cppOutput = cppOutput;
82+
cppCmd.inputFilePath = input.filePath;
83+
cppCmd.outputFilePath = cppOutput.filePath;
8084
cppCmd.type = type === "client" ? "client-code" : "server-code";
8185
cppCmd.sourceCode = function() {
8286
var p = new Process();
8387
try {
8488
p.setEnv("LC_ALL", "C");
85-
p.setWorkingDirectory(FileInfo.path(cppOutput.filePath));
86-
var cppArgs = [type, input.filePath, ""];
89+
p.setWorkingDirectory(FileInfo.path(outputFilePath));
90+
var cppArgs = [type, inputFilePath, ""];
8791
p.exec(exe, cppArgs, true);
88-
var file = new TextFile(cppOutput.filePath, TextFile.WriteOnly);
92+
var file = new TextFile(outputFilePath, TextFile.WriteOnly);
8993
file.write(p.readStdOut());
9094
file.close();
9195
} finally {

qbs-shared.qbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import qbs 1.0
33
Project {
44
name: "QbsShared"
55

6-
readonly property string version: "1.3.0"
6+
readonly property string version: "1.4.0"
77
readonly property var versionParts: version.split('.').map(function(part) { return parseInt(part); })
88

99
property string prefix: "/usr/local"

0 commit comments

Comments
 (0)