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>
This commit is contained in:
Jeremie Guichard 2017-03-11 11:38:26 +07:00 committed by Dirk Hohndel
parent eae4bd82a5
commit ea4df67b32
2 changed files with 7 additions and 0 deletions

View file

@ -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()
{

View file

@ -8,6 +8,7 @@ class TestPreferences : public QObject
{
Q_OBJECT
private slots:
void initTestCase();
void testPreferences();
};