Browse Source

fix qmldump

master
Skycoder42 6 years ago
parent
commit
1ea29c6b17
No known key found for this signature in database GPG Key ID: 8E01AD9EF0578D2B
  1. 2
      .qmake.conf
  2. 24
      src/imports/mvvmcore/mvvmcore.pro
  3. 24
      src/imports/mvvmdatasynccore/mvvmdatasynccore.pro
  4. 25
      src/imports/mvvmdatasyncquick/mvvmdatasyncquick.pro
  5. 6
      src/imports/mvvmdatasyncquick/plugins.qmltypes
  6. 25
      src/imports/mvvmquick/mvvmquick.pro
  7. 6
      src/imports/mvvmquick/plugins.qmltypes
  8. 3
      src/mvvmcore/serviceregistry.cpp

2
.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}

24
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

24
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

25
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

6
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"

25
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

6
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 {

3
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++) {

Loading…
Cancel
Save