diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-04-29 09:12:07 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2016-04-29 08:27:27 +0000 |
commit | 9866624a55fa7164c0f87e4ae44d7ebdb4cee42d (patch) | |
tree | f12e982dfa6c780fa2e51f58fcfe47430086da92 /src/lib/qtprofilesetup/templates | |
parent | a7afa36dd628733c3eac72f6adca503291f5e854 (diff) |
Fix DBus adaptor/interface support.
It's not the base name of the qdbusxml2cpp input file that is used for
the output, but, naturally, the lower-cased second-to-last part of the
file extension.
Change-Id: Ib6fbd8c20f4e50ea1a641a2ee6a15acec710748c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/lib/qtprofilesetup/templates')
-rw-r--r-- | src/lib/qtprofilesetup/templates/dbus.js | 9 | ||||
-rw-r--r-- | src/lib/qtprofilesetup/templates/dbus.qbs | 8 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/lib/qtprofilesetup/templates/dbus.js b/src/lib/qtprofilesetup/templates/dbus.js index f4230393a..86f43e712 100644 --- a/src/lib/qtprofilesetup/templates/dbus.js +++ b/src/lib/qtprofilesetup/templates/dbus.js @@ -30,6 +30,15 @@ var FileInfo = loadExtension("qbs.FileInfo"); +function outputFileName(input, suffix) +{ + var parts = input.fileName.split('.').filter(function(s) { return s.length > 0; }); + if (parts.length === 0) + throw "Cannot run qdbusxml2cpp on '" + input.filePath + "': Unsuitable file name."; + var outputBaseName = parts.length === 1 ? parts[0] : parts[parts.length - 2]; + return outputBaseName.toLowerCase() + suffix; +} + function createCommands(product, input, outputs, option) { var exe = ModUtils.moduleProperty(product, "binPath") + '/' diff --git a/src/lib/qtprofilesetup/templates/dbus.qbs b/src/lib/qtprofilesetup/templates/dbus.qbs index d7d5d0b59..2f07e37c3 100644 --- a/src/lib/qtprofilesetup/templates/dbus.qbs +++ b/src/lib/qtprofilesetup/templates/dbus.qbs @@ -15,11 +15,11 @@ QtModule { inputs: ["qt.dbus.adaptor"] Artifact { - filePath: "GeneratedFiles/" + input.completeBaseName + "_adaptor.h" + filePath: "GeneratedFiles/" + DBus.outputFileName(input, "_adaptor.h") fileTags: ["hpp"] } Artifact { - filePath: "GeneratedFiles/" + input.completeBaseName + "_adaptor.cpp" + filePath: "GeneratedFiles/" + DBus.outputFileName(input, "_adaptor.cpp") fileTags: ["cpp"] } @@ -32,11 +32,11 @@ QtModule { inputs: ["qt.dbus.interface"] Artifact { - filePath: "GeneratedFiles/" + input.completeBaseName + "_interface.h" + filePath: "GeneratedFiles/" + DBus.outputFileName(input, "_interface.h") fileTags: ["hpp"] } Artifact { - filePath: "GeneratedFiles/" + input.completeBaseName + "_interface.cpp" + filePath: "GeneratedFiles/" + DBus.outputFileName(input, "_interface.cpp") fileTags: ["cpp"] } |