aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-10-22 10:51:52 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-10-24 15:23:31 +0200
commit6d02fe20d94169839b661c18b46f3841dfbf0d9b (patch)
treec9c0083b263aa676f8059613a223602fb231fbe3 /tools
parentea59491ff4ddb438c7d93d2aa470b7fb003a7189 (diff)
qmltyperegistrar: Throw an error if import name or version is empty
We cannot generate anything sensible in those cases. Change-Id: I6005b970cedd999212920759a3dd45827b79b77c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmltyperegistrar/qmltypes.prf8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/qmltyperegistrar/qmltypes.prf b/tools/qmltyperegistrar/qmltypes.prf
index 495cc1b0cd..535abd3662 100644
--- a/tools/qmltyperegistrar/qmltypes.prf
+++ b/tools/qmltyperegistrar/qmltypes.prf
@@ -10,6 +10,14 @@ isEmpty(QML_IMPORT_NAME):!isEmpty(TARGETPATH) {
QML_IMPORT_NAME = $$replace(QML_IMPORT_NAME, .$${QML_IMPORT_MAJOR_VERSION}$, '')
}
+isEmpty(QML_IMPORT_NAME) {
+ error("Need TARGET_PATH or QML_IMPORT_NAME in order to generate qml types.");
+}
+
+isEmpty(QML_IMPORT_MAJOR_VERSION) {
+ error("Need IMPORT_VERSION or QML_IMPORT_MAJOR_VERSION in order to generate qml types.");
+}
+
isEmpty(QMLTYPES_FILENAME) {
plugin: QMLTYPES_FILENAME = $$OUT_PWD/plugins.qmltypes
else: QMLTYPES_FILENAME = $$OUT_PWD/$${TEMPLATE}.qmltypes