Only initialize translations in test when compiled with translations
This commit is contained in:
parent
10303cb9c0
commit
4056f00169
@ -21,6 +21,8 @@
|
|||||||
#ifndef RESOURCES_ENV_H
|
#ifndef RESOURCES_ENV_H
|
||||||
#define RESOURCES_ENV_H
|
#define RESOURCES_ENV_H
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include <QResource>
|
#include <QResource>
|
||||||
@ -29,8 +31,10 @@ class ResourcesEnvironment : public ::testing::Environment {
|
|||||||
public:
|
public:
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
Q_INIT_RESOURCE(data);
|
Q_INIT_RESOURCE(data);
|
||||||
Q_INIT_RESOURCE(translations);
|
|
||||||
Q_INIT_RESOURCE(testdata);
|
Q_INIT_RESOURCE(testdata);
|
||||||
|
#ifdef HAVE_TRANSLATIONS
|
||||||
|
Q_INIT_RESOURCE(translations);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user