aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-11-07 14:45:16 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-11-08 10:59:06 +0100
commit8f4765534f83c27301ea758f5189f8f9b6684b6b (patch)
tree5b4f20071f44542805f3becd5fc2844911fa966b /tools
parent210f4271e8946c0da0cefff0c07af80081df20f1 (diff)
qmltyperegistrar: Allow QML_IMPORT_VERSION as alias for IMPORT_VERSION
As we use QML_IMPORT_MAJOR_VERSION, QML_IMPORT_MINOR_VERSION, and QML_IMPORT_NAME, it's strange that we required the raw import version to come without the "QML_". Change-Id: Ida7d677851edf8f4d0179ea2a14772620d65bfa1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmltyperegistrar/qmltypes.prf13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/qmltyperegistrar/qmltypes.prf b/tools/qmltyperegistrar/qmltypes.prf
index 8d7fd3a498..d8e826c671 100644
--- a/tools/qmltyperegistrar/qmltypes.prf
+++ b/tools/qmltyperegistrar/qmltypes.prf
@@ -2,12 +2,15 @@ CONFIG += metatypes
qtPrepareTool(QML_TYPEREGISTRAR, qmltyperegistrar)
+isEmpty(QML_IMPORT_VERSION): \
+ QML_IMPORT_VERSION = $$IMPORT_VERSION
+
# from moc.prf
-isEmpty(QML_IMPORT_MAJOR_VERSION):!isEmpty(IMPORT_VERSION): \
- QML_IMPORT_MAJOR_VERSION = $$section(IMPORT_VERSION, ., 0, 0)
+isEmpty(QML_IMPORT_MAJOR_VERSION):!isEmpty(QML_IMPORT_VERSION): \
+ QML_IMPORT_MAJOR_VERSION = $$section(QML_IMPORT_VERSION, ., 0, 0)
-isEmpty(QML_IMPORT_MINOR_VERSION):!isEmpty(IMPORT_VERSION): \
- QML_IMPORT_MINOR_VERSION = $$section(IMPORT_VERSION, ., 1, 1)
+isEmpty(QML_IMPORT_MINOR_VERSION):!isEmpty(QML_IMPORT_VERSION): \
+ QML_IMPORT_MINOR_VERSION = $$section(QML_IMPORT_VERSION, ., 1, 1)
isEmpty(QML_IMPORT_NAME):!isEmpty(TARGETPATH) {
QML_IMPORT_NAME = $$replace(TARGETPATH, "/", ".")
@@ -19,7 +22,7 @@ isEmpty(QML_IMPORT_NAME) {
}
isEmpty(QML_IMPORT_MAJOR_VERSION) {
- error("Need IMPORT_VERSION or QML_IMPORT_MAJOR_VERSION in order to generate qml types.");
+ error("Need IMPORT_VERSION, QML_IMPORT_VERSION, or QML_IMPORT_MAJOR_VERSION in order to generate qml types.");
}
isEmpty(QML_IMPORT_MINOR_VERSION) {