From 656c17160083eae8f730a2f07644cf8b647729ed Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Wed, 29 Mar 2017 12:16:18 +0300 Subject: Use qml_plugin.prf for the QML plugins That feature takes care of installing qmldir (and plugins.qmltypes if it exists) so the plugins doing it themselves is not necessary anymore. Change-Id: Ie157b153c90db8801a245df1bf0ff00df63b255d Reviewed-by: Teemu Holappa --- .../bluetoothsettings/bluetoothsettings.pro | 15 +++-------- src/imports/displaysettings/displaysettings.pro | 14 +++-------- src/imports/localdevice/localdevice.pro | 17 ++++--------- src/imports/localesettings/localesettings.pro | 14 +++-------- src/imports/networksettings/networksettings.pro | 29 ++++------------------ src/imports/timedatesettings/timedatesettings.pro | 15 +++-------- 6 files changed, 23 insertions(+), 81 deletions(-) (limited to 'src/imports') diff --git a/src/imports/bluetoothsettings/bluetoothsettings.pro b/src/imports/bluetoothsettings/bluetoothsettings.pro index 3e6e6b5..8facaf3 100644 --- a/src/imports/bluetoothsettings/bluetoothsettings.pro +++ b/src/imports/bluetoothsettings/bluetoothsettings.pro @@ -1,17 +1,10 @@ -TEMPLATE = lib -CONFIG += plugin QT += qml bluetooth bluetoothsettings -uri = QtDeviceUtilities.BluetoothSettings -TARGET = btsettingsplugin +CONFIG += no_cxx_module -pluginfiles.files += \ - qmldir \ +TARGET = btsettingsplugin +TARGETPATH = QtDeviceUtilities/BluetoothSettings SOURCES += plugin.cpp -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) - -target.path = $$installPath -pluginfiles.path += $$installPath -INSTALLS += target pluginfiles +load(qml_plugin) diff --git a/src/imports/displaysettings/displaysettings.pro b/src/imports/displaysettings/displaysettings.pro index c148227..efa1903 100644 --- a/src/imports/displaysettings/displaysettings.pro +++ b/src/imports/displaysettings/displaysettings.pro @@ -1,18 +1,10 @@ -TEMPLATE = lib -CONFIG += plugin QT += qml displaysettings -uri = QtDeviceUtilities.DisplaySettings +CONFIG += no_cxx_module TARGET = qmldisplaysettingsplugin +TARGETPATH = QtDeviceUtilities/DisplaySettings SOURCES += plugin.cpp \ -pluginfiles.files += \ - qmldir \ - -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) - -target.path = $$installPath -pluginfiles.path += $$installPath -INSTALLS += target pluginfiles +load(qml_plugin) diff --git a/src/imports/localdevice/localdevice.pro b/src/imports/localdevice/localdevice.pro index 0ef1980..e34a3d5 100644 --- a/src/imports/localdevice/localdevice.pro +++ b/src/imports/localdevice/localdevice.pro @@ -1,17 +1,10 @@ -TEMPLATE = lib -CONFIG += plugin -TARGET = localdeviceplugin -uri = QtDeviceUtilities.LocalDeviceSettings - QT += qml localdevice -pluginfiles.files += \ - qmldir \ +CONFIG += no_cxx_module -SOURCES += plugin.cpp +TARGET = localdeviceplugin +TARGETPATH = QtDeviceUtilities/LocalDeviceSettings -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) +SOURCES += plugin.cpp -target.path = $$installPath -pluginfiles.path += $$installPath -INSTALLS += target pluginfiles +load(qml_plugin) diff --git a/src/imports/localesettings/localesettings.pro b/src/imports/localesettings/localesettings.pro index 35656ea..5dcb5f7 100644 --- a/src/imports/localesettings/localesettings.pro +++ b/src/imports/localesettings/localesettings.pro @@ -1,18 +1,10 @@ -TEMPLATE = lib -CONFIG += plugin QT += qml localesettings -uri = QtDeviceUtilities.LocaleSettings +CONFIG += no_cxx_module TARGET = localesettingsplugin +TARGETPATH = QtDeviceUtilities/LocaleSettings SOURCES += plugin.cpp -pluginfiles.files += \ - qmldir \ - -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) - -target.path = $$installPath -pluginfiles.path += $$installPath -INSTALLS += target pluginfiles +load(qml_plugin) diff --git a/src/imports/networksettings/networksettings.pro b/src/imports/networksettings/networksettings.pro index 1b16421..7c1dc0a 100644 --- a/src/imports/networksettings/networksettings.pro +++ b/src/imports/networksettings/networksettings.pro @@ -1,9 +1,9 @@ -TEMPLATE = lib -TARGET = networksettingsplugin QT += qml quick networksettings -CONFIG += qt plugin -uri = QtDeviceUtilities.NetworkSettings +CONFIG += no_cxx_module + +TARGET = networksettingsplugin +TARGETPATH = QtDeviceUtilities/NetworkSettings SOURCES += \ plugin.cpp \ @@ -11,24 +11,5 @@ SOURCES += \ HEADERS += \ plugin.h \ -DISTFILES = qmldir - -!equals(_PRO_FILE_PWD_, $$OUT_PWD) { - copy_qmldir.target = $$OUT_PWD/qmldir - copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir - copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" - QMAKE_EXTRA_TARGETS += copy_qmldir - PRE_TARGETDEPS += $$copy_qmldir.target -} - -qmldir.files = qmldir - -pluginfiles.files += \ - -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) - -pluginfiles.path = $$installPath -qmldir.path = $$installPath -target.path = $$installPath -INSTALLS += target qmldir pluginfiles +load(qml_plugin) diff --git a/src/imports/timedatesettings/timedatesettings.pro b/src/imports/timedatesettings/timedatesettings.pro index 5e5f913..7ef6756 100644 --- a/src/imports/timedatesettings/timedatesettings.pro +++ b/src/imports/timedatesettings/timedatesettings.pro @@ -1,19 +1,10 @@ -TEMPLATE = lib -CONFIG += plugin QT += qml timedatesettings -uri = QtDeviceUtilities.TimeDateSettings +CONFIG += no_cxx_module -DESTDIR = imports/TimeDate TARGET = qmltimedatesettingsplugin +TARGETPATH = QtDeviceUtilities/TimeDateSettings SOURCES += plugin.cpp -pluginfiles.files += qmldir - -installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) - -target.path = $$installPath -pluginfiles.path += $$installPath -INSTALLS += target pluginfiles - +load(qml_plugin) -- cgit v1.2.3