summaryrefslogtreecommitdiffstats
path: root/tests/testpreferences.cpp
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/testpreferences.cpp
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/testpreferences.cpp')
-rw-r--r--tests/testpreferences.cpp6
1 files changed, 6 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()
{