summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Jeremie Guichard <djebrest@gmail.com>2017-03-11 11:38:26 +0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-03-11 08:05:22 -0800
commitea4df67b32d6ec9e0539c813ea2225ba367ff8a6 (patch)
treef4c5733f79eafe930ac59fea72b49cfc33ce2802 /tests
parenteae4bd82a5e3009ef555771cb77e9289d2a0f585 (diff)
downloadsubsurface-ea4df67b32d6ec9e0539c813ea2225ba367ff8a6.tar.gz
Fix failures in TestPreferences for Windows run
QSettings needs OrganizationName and ApplicationName to be set to work properly under Windows. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/testpreferences.cpp6
-rw-r--r--tests/testpreferences.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp
index c3de709ea..c01e9ec14 100644
--- a/tests/testpreferences.cpp
+++ b/tests/testpreferences.cpp
@@ -11,6 +11,12 @@ pref->sync(); \
pref->load(); \
QCOMPARE(METHOD, VALUE);
+void TestPreferences::initTestCase()
+{
+ QCoreApplication::setOrganizationName("Subsurface");
+ QCoreApplication::setOrganizationDomain("subsurface.hohndel.org");
+ QCoreApplication::setApplicationName("SubsurfaceTestPreferences");
+}
void TestPreferences::testPreferences()
{
diff --git a/tests/testpreferences.h b/tests/testpreferences.h
index 9b2c44ab3..c97efb4de 100644
--- a/tests/testpreferences.h
+++ b/tests/testpreferences.h
@@ -8,6 +8,7 @@ class TestPreferences : public QObject
{
Q_OBJECT
private slots:
+ void initTestCase();
void testPreferences();
};