From 7f866745069ec74f7f7c365a5a3daed12e964973 Mon Sep 17 00:00:00 2001 From: Skycoder42 Date: Tue, 12 Feb 2019 18:07:08 +0100 Subject: [PATCH] ported to qdep --- examples/mvvmcore/SampleCore/samplecore_de.ts | 2 +- src/mvvmcore/mvvmcore.pro | 25 +++++++-------- src/mvvmcore/qpmx.json | 26 ---------------- src/mvvmdatasynccore/mvvmdatasynccore.pro | 20 ++++++------ src/mvvmdatasynccore/qpmx.json | 20 ------------ src/mvvmdatasyncquick/mvvmdatasyncquick.pro | 21 ++++++------- src/mvvmdatasyncquick/qpmx.json | 14 --------- .../mvvmdatasyncwidgets.pro | 17 +++++----- src/mvvmdatasyncwidgets/qpmx.json | 14 --------- src/mvvmquick/mvvmquick.pro | 24 +++++++------- src/mvvmquick/qpmx.json | 20 ------------ src/mvvmwidgets/mvvmwidgets.pro | 31 +++++++++---------- src/mvvmwidgets/qpmx.json | 25 --------------- src/settingsconfig/settingsconfig.pri | 7 +++-- .../mvvmcore/settingsgenerator/test_de.ts | 8 ++--- tools/settingsgenerator/qpmx.json | 21 ------------- tools/settingsgenerator/settingsgenerator.pro | 15 +++++---- 17 files changed, 81 insertions(+), 229 deletions(-) delete mode 100644 src/mvvmcore/qpmx.json delete mode 100644 src/mvvmdatasynccore/qpmx.json delete mode 100644 src/mvvmdatasyncquick/qpmx.json delete mode 100644 src/mvvmdatasyncwidgets/qpmx.json delete mode 100644 src/mvvmquick/qpmx.json delete mode 100644 src/mvvmwidgets/qpmx.json delete mode 100644 tools/settingsgenerator/qpmx.json diff --git a/examples/mvvmcore/SampleCore/samplecore_de.ts b/examples/mvvmcore/SampleCore/samplecore_de.ts index c2be71f..1ba17d8 100644 --- a/examples/mvvmcore/SampleCore/samplecore_de.ts +++ b/examples/mvvmcore/SampleCore/samplecore_de.ts @@ -106,7 +106,7 @@ settings.xml - + &Check me diff --git a/src/mvvmcore/mvvmcore.pro b/src/mvvmcore/mvvmcore.pro index d62a35f..be80844 100644 --- a/src/mvvmcore/mvvmcore.pro +++ b/src/mvvmcore/mvvmcore.pro @@ -60,16 +60,9 @@ TRANSLATIONS += \ translations/qtmvvmcore_de.ts \ translations/qtmvvmcore_template.ts -DISTFILES += $$TRANSLATIONS - load(qt_module) lib_bundle: FRAMEWORK_HEADERS.files += $$absolute_path(ViewModel, $$INC_PATH/include/$$MODULE_INCNAME) else: gen_headers.files += $$absolute_path(ViewModel, $$INC_PATH/include/$$MODULE_INCNAME) -lib_bundle: message($$FRAMEWORK_HEADERS.files) -else: message($$gen_headers.files) - -qpmx_ts_target.path = $$[QT_INSTALL_TRANSLATIONS] -qpmx_ts_target.depends += lrelease FEATURES += \ ../../mkspecs/features/qsettingsgenerator.prf \ @@ -78,7 +71,10 @@ FEATURES += \ features.files = $$FEATURES features.path = $$[QT_HOST_DATA]/mkspecs/features/ -INSTALLS += qpmx_ts_target features +INSTALLS += features + +CONFIG += lrelease +QM_FILES_INSTALL_PATH = $$[QT_INSTALL_TRANSLATIONS] win32 { QMAKE_TARGET_PRODUCT = "$$TARGET" @@ -88,11 +84,8 @@ win32 { QMAKE_TARGET_BUNDLE_PREFIX = "com.skycoder42." } -!ReleaseBuild:!DebugBuild:!system(qpmx -d $$shell_quote($$_PRO_FILE_PWD_) --qmake-run init $$QPMX_EXTRA_OPTIONS $$shell_quote($$QMAKE_QMAKE) $$shell_quote($$OUT_PWD)): error(qpmx initialization failed. Check the compilation log for details.) -else: include($$OUT_PWD/qpmx_generated.pri) - -qpmx_ts_target.files -= $$OUT_PWD/$$QPMX_WORKINGDIR/qtmvvmcore_template.qm -qpmx_ts_target.files += translations/qtmvvmcore_template.ts +QDEP_DEPENDS += \ + Skycoder42/QPluginFactory@1.5.0 # source include for lupdate never_true_for_lupdate { @@ -100,4 +93,8 @@ never_true_for_lupdate { $$files(../imports/mvvmcore/*.qml) } -mingw: LIBS_PRIVATE += -lQt5Gui -lQt5Core +!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.") + +#replace template qm by ts +QM_FILES -= $$__qdep_lrelease_real_dir/qtmvvmcore_template.qm +QM_FILES += translations/qtmvvmcore_template.ts diff --git a/src/mvvmcore/qpmx.json b/src/mvvmcore/qpmx.json deleted file mode 100644 index 4499ab4..0000000 --- a/src/mvvmcore/qpmx.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "dependencies": [ - { - "package": "de.skycoder42.qpluginfactory", - "provider": "qpm", - "version": "1.3.1" - }, - { - "package": "de.skycoder42.qxmlcodegen", - "provider": "qpm", - "version": "1.3.0" - } - ], - "license": { - "file": "", - "name": "" - }, - "prcFile": "", - "priFile": "", - "priIncludes": [ - ], - "publishers": { - }, - "qbsFile": "", - "source": false -} diff --git a/src/mvvmdatasynccore/mvvmdatasynccore.pro b/src/mvvmdatasynccore/mvvmdatasynccore.pro index d53c0b6..ee6c4b7 100644 --- a/src/mvvmdatasynccore/mvvmdatasynccore.pro +++ b/src/mvvmdatasynccore/mvvmdatasynccore.pro @@ -36,12 +36,11 @@ TRANSLATIONS += \ translations/qtmvvmdatasynccore_de.ts \ translations/qtmvvmdatasynccore_template.ts -DISTFILES += $$TRANSLATIONS \ +DISTFILES += \ application-x-datasync-account-data.xml -qpmx_ts_target.path = $$[QT_INSTALL_TRANSLATIONS] -qpmx_ts_target.depends += lrelease -INSTALLS += qpmx_ts_target +CONFIG += lrelease +QM_FILES_INSTALL_PATH = $$[QT_INSTALL_TRANSLATIONS] load(qt_module) @@ -53,11 +52,7 @@ win32 { QMAKE_TARGET_BUNDLE_PREFIX = "com.skycoder42." } -!ReleaseBuild:!DebugBuild:!system(qpmx -d $$shell_quote($$_PRO_FILE_PWD_) --qmake-run init $$QPMX_EXTRA_OPTIONS $$shell_quote($$QMAKE_QMAKE) $$shell_quote($$OUT_PWD)): error(qpmx initialization failed. Check the compilation log for details.) -else: include($$OUT_PWD/qpmx_generated.pri) - -qpmx_ts_target.files -= $$OUT_PWD/$$QPMX_WORKINGDIR/qtmvvmdatasynccore_template.qm -qpmx_ts_target.files += translations/qtmvvmdatasynccore_template.ts +android: QDEP_DEPENDS += Skycoder42/AndroidContentDevice@1.0.0 # source include for lupdate never_true_for_lupdate { @@ -65,4 +60,11 @@ never_true_for_lupdate { $$files(../imports/mvvmdatasynccore/*.qml) } +!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.") + +#replace template qm by ts +QM_FILES -= $$__qdep_lrelease_real_dir/qtmvvmdatasynccore_template.qm +QM_FILES += translations/qtmvvmdatasynccore_template.ts + + diff --git a/src/mvvmdatasynccore/qpmx.json b/src/mvvmdatasynccore/qpmx.json deleted file mode 100644 index 8202189..0000000 --- a/src/mvvmdatasynccore/qpmx.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "dependencies": [ - { - "package": "de.skycoder42.android-contentdevice", - "provider": "qpm", - "version": "1.0.1" - } - ], - "license": { - "file": "", - "name": "" - }, - "prcFile": "", - "priFile": "", - "priIncludes": [ - ], - "publishers": { - }, - "source": false -} diff --git a/src/mvvmdatasyncquick/mvvmdatasyncquick.pro b/src/mvvmdatasyncquick/mvvmdatasyncquick.pro index 40b9597..b75730c 100644 --- a/src/mvvmdatasyncquick/mvvmdatasyncquick.pro +++ b/src/mvvmdatasyncquick/mvvmdatasyncquick.pro @@ -15,14 +15,11 @@ TRANSLATIONS += \ translations/qtmvvmdatasyncquick_de.ts \ translations/qtmvvmdatasyncquick_template.ts -DISTFILES += $$TRANSLATIONS - -qpmx_ts_target.path = $$[QT_INSTALL_TRANSLATIONS] -qpmx_ts_target.depends += lrelease -INSTALLS += qpmx_ts_target - load(qt_module) +CONFIG += lrelease +QM_FILES_INSTALL_PATH = $$[QT_INSTALL_TRANSLATIONS] + win32 { QMAKE_TARGET_PRODUCT = "$$TARGET" QMAKE_TARGET_COMPANY = "Skycoder42" @@ -31,15 +28,15 @@ win32 { QMAKE_TARGET_BUNDLE_PREFIX = "com.skycoder42." } -!ReleaseBuild:!DebugBuild:!system(qpmx -d $$shell_quote($$_PRO_FILE_PWD_) --qmake-run init $$QPMX_EXTRA_OPTIONS $$shell_quote($$QMAKE_QMAKE) $$shell_quote($$OUT_PWD)): error(qpmx initialization failed. Check the compilation log for details.) -else: include($$OUT_PWD/qpmx_generated.pri) - -qpmx_ts_target.files -= $$OUT_PWD/$$QPMX_WORKINGDIR/qtmvvmdatasyncquick_template.qm -qpmx_ts_target.files += translations/qtmvvmdatasyncquick_template.ts - # source include for lupdate never_true_for_lupdate { SOURCES += $$files(../imports/mvvmdatasyncquick/*.cpp) \ $$files(../imports/mvvmdatasyncquick/*.qml) } +!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.") + +#replace template qm by ts +QM_FILES -= $$__qdep_lrelease_real_dir/qtmvvmdatasyncquick_template.qm +QM_FILES += translations/qtmvvmdatasyncquick_template.ts + diff --git a/src/mvvmdatasyncquick/qpmx.json b/src/mvvmdatasyncquick/qpmx.json deleted file mode 100644 index 461fe91..0000000 --- a/src/mvvmdatasyncquick/qpmx.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "dependencies": [], - "license": { - "file": "", - "name": "" - }, - "prcFile": "", - "priFile": "", - "priIncludes": [ - ], - "publishers": { - }, - "source": false -} diff --git a/src/mvvmdatasyncwidgets/mvvmdatasyncwidgets.pro b/src/mvvmdatasyncwidgets/mvvmdatasyncwidgets.pro index 2e7242c..88f3772 100644 --- a/src/mvvmdatasyncwidgets/mvvmdatasyncwidgets.pro +++ b/src/mvvmdatasyncwidgets/mvvmdatasyncwidgets.pro @@ -34,14 +34,11 @@ TRANSLATIONS += \ translations/qtmvvmdatasyncwidgets_de.ts \ translations/qtmvvmdatasyncwidgets_template.ts -DISTFILES += $$TRANSLATIONS - -qpmx_ts_target.path = $$[QT_INSTALL_TRANSLATIONS] -qpmx_ts_target.depends += lrelease -INSTALLS += qpmx_ts_target - load(qt_module) +CONFIG += lrelease +QM_FILES_INSTALL_PATH = $$[QT_INSTALL_TRANSLATIONS] + win32 { QMAKE_TARGET_PRODUCT = "$$TARGET" QMAKE_TARGET_COMPANY = "Skycoder42" @@ -50,8 +47,8 @@ win32 { QMAKE_TARGET_BUNDLE_PREFIX = "com.skycoder42." } -!ReleaseBuild:!DebugBuild:!system(qpmx -d $$shell_quote($$_PRO_FILE_PWD_) --qmake-run init $$QPMX_EXTRA_OPTIONS $$shell_quote($$QMAKE_QMAKE) $$shell_quote($$OUT_PWD)): error(qpmx initialization failed. Check the compilation log for details.) -else: include($$OUT_PWD/qpmx_generated.pri) +!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.") -qpmx_ts_target.files -= $$OUT_PWD/$$QPMX_WORKINGDIR/qtmvvmdatasyncwidgets_template.qm -qpmx_ts_target.files += translations/qtmvvmdatasyncwidgets_template.ts +#replace template qm by ts +QM_FILES -= $$__qdep_lrelease_real_dir/qtmvvmdatasyncwidgets_template.qm +QM_FILES += translations/qtmvvmdatasyncwidgets_template.ts diff --git a/src/mvvmdatasyncwidgets/qpmx.json b/src/mvvmdatasyncwidgets/qpmx.json deleted file mode 100644 index 461fe91..0000000 --- a/src/mvvmdatasyncwidgets/qpmx.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "dependencies": [], - "license": { - "file": "", - "name": "" - }, - "prcFile": "", - "priFile": "", - "priIncludes": [ - ], - "publishers": { - }, - "source": false -} diff --git a/src/mvvmquick/mvvmquick.pro b/src/mvvmquick/mvvmquick.pro index 1837aad..d91102f 100644 --- a/src/mvvmquick/mvvmquick.pro +++ b/src/mvvmquick/mvvmquick.pro @@ -21,14 +21,11 @@ TRANSLATIONS += \ translations/qtmvvmquick_de.ts \ translations/qtmvvmquick_template.ts -DISTFILES += $$TRANSLATIONS - -qpmx_ts_target.path = $$[QT_INSTALL_TRANSLATIONS] -qpmx_ts_target.depends += lrelease -INSTALLS += qpmx_ts_target - load(qt_module) +CONFIG += lrelease +QM_FILES_INSTALL_PATH = $$[QT_INSTALL_TRANSLATIONS] + win32 { QMAKE_TARGET_PRODUCT = "$$TARGET" QMAKE_TARGET_COMPANY = "Skycoder42" @@ -37,16 +34,17 @@ win32 { QMAKE_TARGET_BUNDLE_PREFIX = "com.skycoder42." } -!ReleaseBuild:!DebugBuild:!system(qpmx -d $$shell_quote($$_PRO_FILE_PWD_) --qmake-run init $$QPMX_EXTRA_OPTIONS $$shell_quote($$QMAKE_QMAKE) $$shell_quote($$OUT_PWD)): error(qpmx initialization failed. Check the compilation log for details.) -else: include($$OUT_PWD/qpmx_generated.pri) - -qpmx_ts_target.files -= $$OUT_PWD/$$QPMX_WORKINGDIR/qtmvvmquick_template.qm -qpmx_ts_target.files += translations/qtmvvmquick_template.ts - -mingw: LIBS_PRIVATE += -lQt5Gui -lQt5Core +QDEP_DEPENDS += \ + Skycoder42/QUrlValidator@1.2.0 # source include for lupdate never_true_for_lupdate { SOURCES += $$files(../imports/mvvmquick/*.cpp) \ $$files(../imports/mvvmquick/*.qml) } + +!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.") + +#replace template qm by ts +QM_FILES -= $$__qdep_lrelease_real_dir/qtmvvmquick_template.qm +QM_FILES += translations/qtmvvmquick_template.ts diff --git a/src/mvvmquick/qpmx.json b/src/mvvmquick/qpmx.json deleted file mode 100644 index 7fa89ac..0000000 --- a/src/mvvmquick/qpmx.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "dependencies": [ - { - "package": "de.skycoder42.qurlvalidator", - "provider": "qpm", - "version": "1.1.0" - } - ], - "license": { - "file": "", - "name": "" - }, - "prcFile": "", - "priFile": "", - "priIncludes": [ - ], - "publishers": { - }, - "source": false -} diff --git a/src/mvvmwidgets/mvvmwidgets.pro b/src/mvvmwidgets/mvvmwidgets.pro index 85f7151..abb0d00 100644 --- a/src/mvvmwidgets/mvvmwidgets.pro +++ b/src/mvvmwidgets/mvvmwidgets.pro @@ -13,9 +13,9 @@ HEADERS += \ inputwidgetfactory_p.h \ settingsdialog_p.h \ settingsdialog.h \ - tooltipslider_p.h \ - coloredit_p.h \ - progressdialog_p.h + tooltipslider_p.h \ + coloredit_p.h \ + progressdialog_p.h SOURCES += \ widgetspresenter.cpp \ @@ -23,9 +23,9 @@ SOURCES += \ selectcombobox.cpp \ inputwidgetfactory.cpp \ settingsdialog.cpp \ - tooltipslider.cpp \ - coloredit.cpp \ - progressdialog.cpp + tooltipslider.cpp \ + coloredit.cpp \ + progressdialog.cpp FORMS += \ settingsdialog.ui @@ -37,11 +37,8 @@ TRANSLATIONS += \ translations/qtmvvmwidgets_de.ts \ translations/qtmvvmwidgets_template.ts -DISTFILES += $$TRANSLATIONS - -qpmx_ts_target.path = $$[QT_INSTALL_TRANSLATIONS] -qpmx_ts_target.depends += lrelease -INSTALLS += qpmx_ts_target +CONFIG += lrelease +QM_FILES_INSTALL_PATH = $$[QT_INSTALL_TRANSLATIONS] load(qt_module) @@ -53,10 +50,12 @@ win32 { QMAKE_TARGET_BUNDLE_PREFIX = "com.skycoder42." } -!ReleaseBuild:!DebugBuild:!system(qpmx -d $$shell_quote($$_PRO_FILE_PWD_) --qmake-run init $$QPMX_EXTRA_OPTIONS $$shell_quote($$QMAKE_QMAKE) $$shell_quote($$OUT_PWD)): error(qpmx initialization failed. Check the compilation log for details.) -else: include($$OUT_PWD/qpmx_generated.pri) +QDEP_DEPENDS += \ + Skycoder42/DialogMaster@1.4.0 \ + Skycoder42/QUrlValidator@1.2.0 -qpmx_ts_target.files -= $$OUT_PWD/$$QPMX_WORKINGDIR/qtmvvmwidgets_template.qm -qpmx_ts_target.files += translations/qtmvvmwidgets_template.ts +!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.") -mingw: LIBS_PRIVATE += -lQt5Widgets -lQt5Gui -lQt5Core +#replace template qm by ts +QM_FILES -= $$__qdep_lrelease_real_dir/qtmvvmwidgets_template.qm +QM_FILES += translations/qtmvvmwidgets_template.ts diff --git a/src/mvvmwidgets/qpmx.json b/src/mvvmwidgets/qpmx.json deleted file mode 100644 index a817646..0000000 --- a/src/mvvmwidgets/qpmx.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "dependencies": [ - { - "package": "de.skycoder42.dialog-master", - "provider": "qpm", - "version": "1.3.2" - }, - { - "package": "de.skycoder42.qurlvalidator", - "provider": "qpm", - "version": "1.1.0" - } - ], - "license": { - "file": "", - "name": "" - }, - "prcFile": "", - "priFile": "", - "priIncludes": [ - ], - "publishers": { - }, - "source": false -} diff --git a/src/settingsconfig/settingsconfig.pri b/src/settingsconfig/settingsconfig.pri index f3e735a..20540ec 100644 --- a/src/settingsconfig/settingsconfig.pri +++ b/src/settingsconfig/settingsconfig.pri @@ -1,8 +1,8 @@ HEADERS += \ $$PWD/../3rdparty/optional-lite/optional.hpp \ $$PWD/../3rdparty/variant-lite/variant.hpp \ - $$PWD/prefix_p.h \ - $$PWD/settingsconfigimpl_p.h + $$PWD/prefix_p.h \ + $$PWD/settingsconfigimpl_p.h SOURCES += $$PWD/settingsconfigimpl.cpp @@ -12,3 +12,6 @@ INCLUDEPATH += $$PWD $$PWD/../3rdparty/optional-lite $$PWD/../3rdparty/variant-l contains(QT, xmlpatterns): RESOURCES += \ $$PWD/settingsconfig.qrc + +QDEP_DEPENDS += \ + Skycoder42/QXmlCodeGen@1.4.1 diff --git a/tests/auto/mvvmcore/settingsgenerator/test_de.ts b/tests/auto/mvvmcore/settingsgenerator/test_de.ts index 149e527..493a700 100644 --- a/tests/auto/mvvmcore/settingsgenerator/test_de.ts +++ b/tests/auto/mvvmcore/settingsgenerator/test_de.ts @@ -12,7 +12,7 @@ generatortest.xml - + translate me @@ -20,7 +20,7 @@ import_config.xml - + 42 @@ -36,7 +36,7 @@ some_context - + Hello World @@ -44,7 +44,7 @@ translatortest.xml - + dummy diff --git a/tools/settingsgenerator/qpmx.json b/tools/settingsgenerator/qpmx.json deleted file mode 100644 index 2c53e8f..0000000 --- a/tools/settingsgenerator/qpmx.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "dependencies": [ - { - "package": "de.skycoder42.qxmlcodegen", - "provider": "qpm", - "version": "1.3.0" - } - ], - "license": { - "file": "", - "name": "" - }, - "prcFile": "", - "priFile": "", - "priIncludes": [ - ], - "publishers": { - }, - "qbsFile": "", - "source": false -} diff --git a/tools/settingsgenerator/settingsgenerator.pro b/tools/settingsgenerator/settingsgenerator.pro index c0e7215..946a455 100644 --- a/tools/settingsgenerator/settingsgenerator.pro +++ b/tools/settingsgenerator/settingsgenerator.pro @@ -16,16 +16,16 @@ DEFINES += "BUNDLE_PREFIX=\\\"$$BUNDLE_PREFIX\\\"" HEADERS += \ settingstranslator.h \ - cppsettingsgenerator.h \ - settingsgeneratorimpl.h \ - qmlsettingsgenerator.h + cppsettingsgenerator.h \ + settingsgeneratorimpl.h \ + qmlsettingsgenerator.h SOURCES += \ main.cpp \ settingstranslator.cpp \ - cppsettingsgenerator.cpp \ - settingsgeneratorimpl.cpp \ - qmlsettingsgenerator.cpp + cppsettingsgenerator.cpp \ + settingsgeneratorimpl.cpp \ + qmlsettingsgenerator.cpp XML_SCHEMA_DEFINITIONS += \ qsettingsgenerator.xsd @@ -44,5 +44,4 @@ win32 { QMAKE_TARGET_BUNDLE_PREFIX = $${BUNDLE_PREFIX}. } -!ReleaseBuild:!DebugBuild:!system(qpmx -d $$shell_quote($$_PRO_FILE_PWD_) --qmake-run init $$QPMX_EXTRA_OPTIONS $$shell_quote($$QMAKE_QMAKE) $$shell_quote($$OUT_PWD)): error(qpmx initialization failed. Check the compilation log for details.) -else: include($$OUT_PWD/qpmx_generated.pri) +!load(qdep):error("Failed to load qdep feature! Run 'qdep prfgen --qmake $$QMAKE_QMAKE' to create it.")