From 00c1779bf3e7582887de78c2980a982abcbe3738 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 18 Jan 2020 16:33:53 +0000 Subject: [PATCH] Fix 'qt4test' test executable when only Qt4 is present This always tries to load a 'qt5core_fr' translation file, when it is actually named 'qtNcore_fr'(where N is the qt version). --- test cases/frameworks/4 qt/meson.build | 1 + test cases/frameworks/4 qt/q5core.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test cases/frameworks/4 qt/meson.build b/test cases/frameworks/4 qt/meson.build index f5bfa9524..7934572db 100644 --- a/test cases/frameworks/4 qt/meson.build +++ b/test cases/frameworks/4 qt/meson.build @@ -83,6 +83,7 @@ foreach qt : ['qt4', 'qt5'] qtcore = dependency(qt, modules : 'Core', method : get_option('method')) qtcoreapp = executable(qt + 'core', 'q5core.cpp', + cpp_args: '-DQT="@0@"'.format(qt), dependencies : qtcore) test(qt + 'test', qtcoreapp) diff --git a/test cases/frameworks/4 qt/q5core.cpp b/test cases/frameworks/4 qt/q5core.cpp index 25b80b8e3..44581a687 100644 --- a/test cases/frameworks/4 qt/q5core.cpp +++ b/test cases/frameworks/4 qt/q5core.cpp @@ -15,7 +15,7 @@ int main(int argc, char **argv) { app.installTranslator(&qtTranslator); QTranslator myappTranslator; - if(!myappTranslator.load("qt5core_fr") ) + if(!myappTranslator.load(QT "core_fr") ) return 1; app.installTranslator(&myappTranslator);