summaryrefslogtreecommitdiff
path: root/tests/unit/Settings/TestSettings.cpp
blob: 1f3fbb438034e85362a6428828136e1e72b401f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <QtCore>
#include <gtest/gtest.h>

#include "TestSettings.h"

void TestSettings::init()
{
    QSettings::setDefaultFormat(QSettings::IniFormat);
    QCoreApplication::setOrganizationName("freshmemory");
    QCoreApplication::setApplicationName("freshmemory");
    QString appDir = qApp->applicationDirPath();
    QString userSettingsDir = appDir + "/../common";
    QString systemSettingsDir = appDir + "/../../config";
    QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, userSettingsDir);
    QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope, systemSettingsDir);
}