diff --git a/.qmake.conf b/.qmake.conf index c3a88d9..3e5a18b 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -9,6 +9,6 @@ DEFINES += QT_DEPRECATED_WARNINGS QT_ASCII_CAST_WARNINGS MODULE_VERSION_MAJOR = 1 MODULE_VERSION_MINOR = 1 -MODULE_VERSION_PATCH = 4 +MODULE_VERSION_PATCH = 5 MODULE_VERSION_IMPORT = $${MODULE_VERSION_MAJOR}.$${MODULE_VERSION_MINOR} MODULE_VERSION = $${MODULE_VERSION_MAJOR}.$${MODULE_VERSION_MINOR}.$${MODULE_VERSION_PATCH} diff --git a/src/imports/mvvmcore/mvvmcore.pro b/src/imports/mvvmcore/mvvmcore.pro index e22a65b..2a6afb3 100644 --- a/src/imports/mvvmcore/mvvmcore.pro +++ b/src/imports/mvvmcore/mvvmcore.pro @@ -22,19 +22,25 @@ SOURCES += \ OTHER_FILES += qmldir -generate_qmltypes { - typeextra1.target = qmltypes - typeextra1.depends += export LD_LIBRARY_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(LD_LIBRARY_PATH)" - typeextra2.target = qmltypes - typeextra2.depends += export QML2_IMPORT_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/qml/" - QMAKE_EXTRA_TARGETS += typeextra1 typeextra2 -} - CONFIG += qmlcache load(qml_plugin) generate_qmltypes { - qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) #overwrite the target deps + # run again to overwrite module env + ldpath.name = LD_LIBRARY_PATH + ldpath.value = "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$$(LD_LIBRARY_PATH)" + qmlpath.name = QML2_IMPORT_PATH + qmlpath.value = "$$shadowed($$dirname(_QMAKE_CONF_))/qml/:$$[QT_INSTALL_QML]:$$(QML2_IMPORT_PATH)" + PLGDUMP_ENV = ldpath qmlpath + QT_TOOL_ENV = ldpath qmlpath + qtPrepareTool(QMLPLUGINDUMP, qmlplugindump) + QT_TOOL_ENV = + + #overwrite the target deps as make target is otherwise not detected + qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) + OLDDMP = $$take_first(qmltypes.commands) + qmltypes.commands = $$QMLPLUGINDUMP $${qmltypes.commands} + message("replaced $$OLDDMP with $$QMLPLUGINDUMP") mfirst.target = all mfirst.depends += qmltypes diff --git a/src/imports/mvvmdatasynccore/mvvmdatasynccore.pro b/src/imports/mvvmdatasynccore/mvvmdatasynccore.pro index 3e895ce..9e7fc71 100644 --- a/src/imports/mvvmdatasynccore/mvvmdatasynccore.pro +++ b/src/imports/mvvmdatasynccore/mvvmdatasynccore.pro @@ -14,19 +14,25 @@ SOURCES += \ OTHER_FILES += qmldir -generate_qmltypes { - typeextra1.target = qmltypes - typeextra1.depends += export LD_LIBRARY_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(LD_LIBRARY_PATH)" - typeextra2.target = qmltypes - typeextra2.depends += export QML2_IMPORT_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/qml/" - QMAKE_EXTRA_TARGETS += typeextra1 typeextra2 -} - CONFIG += qmlcache load(qml_plugin) generate_qmltypes { - qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) #overwrite the target deps + # run again to overwrite module env + ldpath.name = LD_LIBRARY_PATH + ldpath.value = "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$$(LD_LIBRARY_PATH)" + qmlpath.name = QML2_IMPORT_PATH + qmlpath.value = "$$shadowed($$dirname(_QMAKE_CONF_))/qml/:$$[QT_INSTALL_QML]:$$(QML2_IMPORT_PATH)" + PLGDUMP_ENV = ldpath qmlpath + QT_TOOL_ENV = ldpath qmlpath + qtPrepareTool(QMLPLUGINDUMP, qmlplugindump) + QT_TOOL_ENV = + + #overwrite the target deps as make target is otherwise not detected + qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) + OLDDMP = $$take_first(qmltypes.commands) + qmltypes.commands = $$QMLPLUGINDUMP $${qmltypes.commands} + message("replaced $$OLDDMP with $$QMLPLUGINDUMP") mfirst.target = all mfirst.depends += qmltypes diff --git a/src/imports/mvvmdatasyncquick/mvvmdatasyncquick.pro b/src/imports/mvvmdatasyncquick/mvvmdatasyncquick.pro index 7900106..a1ef927 100644 --- a/src/imports/mvvmdatasyncquick/mvvmdatasyncquick.pro +++ b/src/imports/mvvmdatasyncquick/mvvmdatasyncquick.pro @@ -24,20 +24,25 @@ RESOURCES += \ OTHER_FILES += qmldir -generate_qmltypes { - typeextra1.target = qmltypes - typeextra1.depends += export LD_LIBRARY_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(LD_LIBRARY_PATH)" - typeextra2.target = qmltypes - typeextra2.depends += export QML2_IMPORT_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/qml/" - QMAKE_EXTRA_TARGETS += typeextra1 typeextra2 -} - CONFIG += qmlcache load(qml_plugin) generate_qmltypes { - qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) #overwrite the target deps - qmltypes.commands += "2>/dev/null" # kill invalid qml warnings + # run again to overwrite module env + ldpath.name = LD_LIBRARY_PATH + ldpath.value = "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$$(LD_LIBRARY_PATH)" + qmlpath.name = QML2_IMPORT_PATH + qmlpath.value = "$$shadowed($$dirname(_QMAKE_CONF_))/qml/:$$[QT_INSTALL_QML]:$$(QML2_IMPORT_PATH)" + PLGDUMP_ENV = ldpath qmlpath + QT_TOOL_ENV = ldpath qmlpath + qtPrepareTool(QMLPLUGINDUMP, qmlplugindump) + QT_TOOL_ENV = + + #overwrite the target deps as make target is otherwise not detected + qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) + OLDDMP = $$take_first(qmltypes.commands) + qmltypes.commands = $$QMLPLUGINDUMP $${qmltypes.commands} + message("replaced $$OLDDMP with $$QMLPLUGINDUMP") mfirst.target = all mfirst.depends += qmltypes diff --git a/src/imports/mvvmdatasyncquick/plugins.qmltypes b/src/imports/mvvmdatasyncquick/plugins.qmltypes index 38cf4e0..eeb4e84 100644 --- a/src/imports/mvvmdatasyncquick/plugins.qmltypes +++ b/src/imports/mvvmdatasyncquick/plugins.qmltypes @@ -10,11 +10,11 @@ Module { dependencies: [ "Qt.labs.calendar 1.0", "Qt.labs.platform 1.0", - "QtGraphicalEffects 1.0", + "QtGraphicalEffects 1.12", "QtQml 2.2", "QtQml.Models 2.3", - "QtQuick 2.8", - "QtQuick.Window 2.1", + "QtQuick 2.12", + "QtQuick.Window 2.12", "de.skycoder42.QtMvvm.Core 1.0", "de.skycoder42.QtMvvm.DataSync.Core 1.0", "de.skycoder42.QtMvvm.Quick 1.0" diff --git a/src/imports/mvvmquick/mvvmquick.pro b/src/imports/mvvmquick/mvvmquick.pro index 659c391..d9b910b 100644 --- a/src/imports/mvvmquick/mvvmquick.pro +++ b/src/imports/mvvmquick/mvvmquick.pro @@ -71,20 +71,25 @@ android { SOURCES += androidfilechooser.cpp } -generate_qmltypes { - typeextra1.target = qmltypes - typeextra1.depends += export LD_LIBRARY_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(LD_LIBRARY_PATH)" - typeextra2.target = qmltypes - typeextra2.depends += export QML2_IMPORT_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/qml/" - QMAKE_EXTRA_TARGETS += typeextra1 typeextra2 -} - CONFIG += qmlcache load(qml_plugin) generate_qmltypes { - qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) #overwrite the target deps - qmltypes.commands += "2>/dev/null" # kill invalid qml warnings + # run again to overwrite module env + ldpath.name = LD_LIBRARY_PATH + ldpath.value = "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$$(LD_LIBRARY_PATH)" + qmlpath.name = QML2_IMPORT_PATH + qmlpath.value = "$$shadowed($$dirname(_QMAKE_CONF_))/qml/:$$[QT_INSTALL_QML]:$$(QML2_IMPORT_PATH)" + PLGDUMP_ENV = ldpath qmlpath + QT_TOOL_ENV = ldpath qmlpath + qtPrepareTool(QMLPLUGINDUMP, qmlplugindump) + QT_TOOL_ENV = + + #overwrite the target deps as make target is otherwise not detected + qmltypes.depends = ../../../qml/$$TARGETPATH/$(TARGET) + OLDDMP = $$take_first(qmltypes.commands) + qmltypes.commands = $$QMLPLUGINDUMP $${qmltypes.commands} + message("replaced $$OLDDMP with $$QMLPLUGINDUMP") mfirst.target = all mfirst.depends += qmltypes diff --git a/src/imports/mvvmquick/plugins.qmltypes b/src/imports/mvvmquick/plugins.qmltypes index f0e08c3..a1f7c03 100644 --- a/src/imports/mvvmquick/plugins.qmltypes +++ b/src/imports/mvvmquick/plugins.qmltypes @@ -10,10 +10,10 @@ Module { dependencies: [ "Qt.labs.calendar 1.0", "Qt.labs.platform 1.0", - "QtGraphicalEffects 1.0", + "QtGraphicalEffects 1.12", "QtQml 2.2", - "QtQuick 2.8", - "QtQuick.Window 2.1", + "QtQuick 2.12", + "QtQuick.Window 2.12", "de.skycoder42.QtMvvm.Core 1.0" ] Component { diff --git a/src/mvvmcore/serviceregistry.cpp b/src/mvvmcore/serviceregistry.cpp index b9c8aca..260a136 100644 --- a/src/mvvmcore/serviceregistry.cpp +++ b/src/mvvmcore/serviceregistry.cpp @@ -134,8 +134,7 @@ QObject *ServiceRegistryPrivate::constructInjectedLocked(const QMetaObject *meta void ServiceRegistryPrivate::injectLocked(QObject *object) { - static QRegularExpression nameRegex(QStringLiteral(R"__(^__qtmvvm_inject_(.+)$)__"), - QRegularExpression::OptimizeOnFirstUsageOption); + static QRegularExpression nameRegex(QStringLiteral(R"__(^__qtmvvm_inject_(.+)$)__")); auto metaObject = object->metaObject(); for(auto i = 0; i < metaObject->propertyCount(); i++) {