diff --git a/.gitignore b/.gitignore index e9c6ed5..a63120c 100644 --- a/.gitignore +++ b/.gitignore @@ -78,4 +78,4 @@ qpmx.user.json .ts-dummy .qpmx-dev-cache qpmx.json.user -*.prodummy +*.pro.dummy diff --git a/mkspecs/features/qsettingstranslator.prf b/mkspecs/features/qsettingstranslator.prf index 3dd0f44..c4c8d6e 100644 --- a/mkspecs/features/qsettingstranslator.prf +++ b/mkspecs/features/qsettingstranslator.prf @@ -9,7 +9,7 @@ debug_and_release { } QSETTINGSTRANSLATOR_DIR = $$QSETTINGSTRANSLATOR_DIR$$SUFFIX -!ReleaseBuild:!DebugBuild: { +!ReleaseBuild: { qsettingstranslator_c.name = qsettingsgenerator --translate ${QMAKE_FILE_IN} qsettingstranslator_c.input = SETTINGS_TRANSLATIONS #TODO compability qsettingstranslator_c.variable_out = CPP_DUMMIES @@ -21,12 +21,16 @@ QSETTINGSTRANSLATOR_DIR = $$QSETTINGSTRANSLATOR_DIR$$SUFFIX QMAKE_EXTRA_COMPILERS += qsettingstranslator_c DBL_DOLLAR = $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR} + defineReplace(qmake_escape) { + win32: return($$1) + else: return($$shell_quote($$1)) + } lupdate_fakepri_c.name = fakepri ${QMAKE_FILE_IN} lupdate_fakepri_c.input = CPP_DUMMIES GENERATED_SOURCES lupdate_fakepri_c.variable_out = TS_FAKEPRI_FILES - lupdate_fakepri_c.commands = echo $$shell_quote(BUILD_SOURCES += ${QMAKE_FILE_IN}) > $@ \ - $$escape_expand(\\n\\t)echo $$shell_quote(for(src, BUILD_SOURCES): SOURCES += $${DBL_DOLLAR}PWD/$${DBL_DOLLAR}src) >> $@ + lupdate_fakepri_c.commands = echo $$qmake_escape(BUILD_SOURCES += ${QMAKE_FILE_IN}) > ${QMAKE_FILE_OUT} \ + $$escape_expand(\\n\\t)echo $$qmake_escape(for(src, BUILD_SOURCES): SOURCES += $${DBL_DOLLAR}PWD/$${DBL_DOLLAR}src) >> ${QMAKE_FILE_OUT} lupdate_fakepri_c.output = .ts-sources.pri lupdate_fakepri_c.CONFIG += combine no_link QMAKE_EXTRA_COMPILERS += lupdate_fakepri_c @@ -34,17 +38,16 @@ QSETTINGSTRANSLATOR_DIR = $$QSETTINGSTRANSLATOR_DIR$$SUFFIX lupdate_fakepro_c.name = fakepro ${QMAKE_FILE_IN} lupdate_fakepro_c.input = TS_FAKEPRI_FILES lupdate_fakepro_c.variable_out = TS_FAKEPRO_FILES - lupdate_fakepro_c.commands = echo $$shell_quote(EXTRAPRI =) $(realpath $<) > $@ \ - $$escape_expand(\\n\\t)echo $$shell_quote(include($${DBL_DOLLAR}EXTRAPRI)) >> $@ \ - $$escape_expand(\\n\\t)echo $$shell_quote(include($$_PRO_FILE_)) >> $@ + lupdate_fakepro_c.commands = echo $$qmake_escape(include($$shadowed($$_PRO_FILE_PWD_)/${QMAKE_FILE_IN})) > ${QMAKE_FILE_OUT} \ + $$escape_expand(\\n\\t)echo $$qmake_escape(include($$_PRO_FILE_)) >> ${QMAKE_FILE_OUT} lupdate_fakepro_c.output = $$_PRO_FILE_PWD_/.tsdummy.pro.dummy lupdate_fakepro_c.CONFIG += combine no_link QMAKE_EXTRA_COMPILERS += lupdate_fakepro_c lupdate_c.name = lupdate ${QMAKE_FILE_IN} lupdate_c.input = TS_FAKEPRO_FILES SOURCES CPP_DUMMIES GENERATED_SOURCES - lupdate_c.commands = $$QMAKE_LUPDATE -locations relative -pro-out $$shell_quote($$_PRO_FILE_PWD_) -pro $< \ - $$escape_expand(\\n\\t)$$QMAKE_MKDIR $$QSETTINGSTRANSLATOR_DIR/.lupdate + lupdate_c.commands = $$QMAKE_LUPDATE -locations relative -pro-out $$shell_quote($$_PRO_FILE_PWD_) -pro $$shell_quote($$_PRO_FILE_PWD_/.tsdummy.pro.dummy) \ + $$escape_expand(\\n\\t)echo created > $$QSETTINGSTRANSLATOR_DIR/.lupdate lupdate_c.output = $$QSETTINGSTRANSLATOR_DIR/.lupdate lupdate_c.CONFIG += combine no_link lupdate_c.depends += $$QMAKE_LUPDATE_EXE diff --git a/tests/auto/mvvmcore/settingsgenerator/.tsdummy.pro.dummy b/tests/auto/mvvmcore/settingsgenerator/.tsdummy.pro.dummy deleted file mode 100644 index 20482a4..0000000 --- a/tests/auto/mvvmcore/settingsgenerator/.tsdummy.pro.dummy +++ /dev/null @@ -1,3 +0,0 @@ -EXTRAPRI = /home/sky/Programming/QtLibraries/build-qtmvvm-Desktop_Qt_5_11_1_GCC_64bit-Debug/tests/auto/mvvmcore/settingsgenerator/.ts-sources.pri -include($$EXTRAPRI) -include(/home/sky/Programming/QtLibraries/QtMvvm/tests/auto/mvvmcore/settingsgenerator/settingsgenerator.pro) diff --git a/tests/auto/mvvmcore/settingsgenerator/test_de.ts b/tests/auto/mvvmcore/settingsgenerator/test_de.ts index bc14478..a7c82dd 100644 --- a/tests/auto/mvvmcore/settingsgenerator/test_de.ts +++ b/tests/auto/mvvmcore/settingsgenerator/test_de.ts @@ -6,7 +6,6 @@ somet translated text... - something translated...