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') 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