From 4056f001696446e1239848b568ab5cc6c8fa42fb Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 10 Sep 2020 22:11:40 +0200 Subject: [PATCH] Only initialize translations in test when compiled with translations --- tests/src/resources_env.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/src/resources_env.h b/tests/src/resources_env.h index 9eb28dfc2..701185e25 100644 --- a/tests/src/resources_env.h +++ b/tests/src/resources_env.h @@ -21,6 +21,8 @@ #ifndef RESOURCES_ENV_H #define RESOURCES_ENV_H +#include "config.h" + #include #include @@ -29,8 +31,10 @@ class ResourcesEnvironment : public ::testing::Environment { public: void SetUp() override { Q_INIT_RESOURCE(data); - Q_INIT_RESOURCE(translations); Q_INIT_RESOURCE(testdata); +#ifdef HAVE_TRANSLATIONS + Q_INIT_RESOURCE(translations); +#endif } };