From 27f54076cd26f57ef815ba1e11fe25f35c5c7b20 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 30 Aug 2018 11:40:35 +0200 Subject: Automatically pick up dependencies.json file for qmlplugindump The dependencies.json file allows to tweak the list of imports the module is depending on, so that types implicitly imported are not listed twice. Task-number: QTBUG-70264 Change-Id: I7a3800e5ea713a8aaae0cddbf4e1607f92c41497 Reviewed-by: Oswald Buddenhagen Reviewed-by: Shawn Rutledge --- mkspecs/features/qml_plugin.prf | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mkspecs/features/qml_plugin.prf') diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index 0786dbfd84..cd6377dcc6 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -110,6 +110,14 @@ load(qt_common) load(resolve_target) TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, ) + + !qml1_target { + isEmpty(QMAKE_PLUGINDUMP_DEPENDENCIES_FILE):exists($$_PRO_FILE_PWD_/dependencies.json): \ + QMAKE_PLUGINDUMP_DEPENDENCIES_FILE = $$_PRO_FILE_PWD_/dependencies.json + !isEmpty(QMAKE_PLUGINDUMP_DEPENDENCIES_FILE): \ + QMAKE_QMLPLUGINDUMP_FLAGS += -dependencies $$shell_quote($$QMAKE_PLUGINDUMP_DEPENDENCIES_FILE) + } + qmltypes.target = qmltypes qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE qmltypes.depends = $$QMAKE_RESOLVED_TARGET -- cgit v1.2.3 From 1983abddc06350541ac7a4bb4b2da14091e96311 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 4 Oct 2018 10:08:26 +0200 Subject: Remove support for qml1 plugins and modules The Qt Quick 1 module got dropped in Qt 5.6, and almost certainly doesn't compile anymore. Change-Id: Ia1ae6937e9cc4d99508be8eeeff9b12d0f001002 Reviewed-by: Edward Welbourne Reviewed-by: Shawn Rutledge Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qml_plugin.prf | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'mkspecs/features/qml_plugin.prf') diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index cd6377dcc6..ad8ecdf5f1 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -48,15 +48,9 @@ exists($$QMLTYPEFILE): AUX_QML_FILES += $$QMLTYPEFILE load(qt_build_paths) -qml1_target { - DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH - instbase = $$[QT_INSTALL_IMPORTS] -} else { - DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH - instbase = $$[QT_INSTALL_QML] -} +DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH -target.path = $$instbase/$$TARGETPATH +target.path = $$[QT_INSTALL_QML]/$$TARGETPATH INSTALLS += target # Some final setup @@ -75,20 +69,11 @@ load(qt_common) # directory. Then review and commit the changes made to plugins.qmltypes. # !cross_compile { - qml1_target { - qmlplugindump = qml1plugindump - importpath.name = QML_IMPORT_PATH - } else { - qmlplugindump = qmlplugindump - importpath.name = QML2_IMPORT_PATH - } + qmlplugindump = qmlplugindump + importpath.name = QML2_IMPORT_PATH importpath.value = for(qmod, QTREPOS) { - qml1_target: \ - qmod = $$qmod/imports - else: \ - qmod = $$qmod/qml - exists($$qmod): importpath.value += $$shell_path($$qmod) + exists($$qmod/qml): importpath.value += $$shell_path($$qmod/qml) } importpath.value = $$unique(importpath.value) QT_TOOL_ENV = importpath -- cgit v1.2.3 From bc107d81004a5f3929f30088f4a58a221bea5c3b Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 25 Feb 2019 13:33:18 +0100 Subject: Allow QML plugin to specify import name explicitly For creating the qmlplugindump rule we need the name of the import. So far we're trying to derive this from the directory name, but that becomes complicated if versions are included, like QtQuick/Controls.2/Fusion Instead of trying to tweak the regexp even more to capture this, we now allow a plugin to set it's name explicitly via IMPORT_NAME. Change-Id: Ie75dae7d41398b3ac19ccb6910002b6fad009891 Reviewed-by: Joerg Bornemann --- mkspecs/features/qml_plugin.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs/features/qml_plugin.prf') diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf index ad8ecdf5f1..02068ae766 100644 --- a/mkspecs/features/qml_plugin.prf +++ b/mkspecs/features/qml_plugin.prf @@ -94,7 +94,7 @@ load(qt_common) } load(resolve_target) - TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, ) + isEmpty(IMPORT_NAME): IMPORT_NAME = $$replace(TARGETPATH, \\.\\d+\$, ) !qml1_target { isEmpty(QMAKE_PLUGINDUMP_DEPENDENCIES_FILE):exists($$_PRO_FILE_PWD_/dependencies.json): \ @@ -104,7 +104,7 @@ load(qt_common) } qmltypes.target = qmltypes - qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE + qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(IMPORT_NAME, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE qmltypes.depends = $$QMAKE_RESOLVED_TARGET } else { qmltypes.CONFIG += recursive -- cgit v1.2.3