Only initialize translations in test when compiled with translations

This commit is contained in:
Jonas Kvinge 2020-09-10 22:11:40 +02:00
parent 10303cb9c0
commit 4056f00169
1 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,8 @@
#ifndef RESOURCES_ENV_H
#define RESOURCES_ENV_H
#include "config.h"
#include <gtest/gtest.h>
#include <QResource>
@ -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
}
};