refactor: Rename setSettingFile to setSettingsFile for consistency
This commit is contained in:
parent
bb1394ceeb
commit
687fd5411a
8 changed files with 9 additions and 9 deletions
|
|
@ -18,7 +18,7 @@ Settings *Settings::instance()
|
||||||
return &m;
|
return &m;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::setSettingFile(const QString &settingsFile)
|
void Settings::setSettingsFile(const QString &settingsFile)
|
||||||
{
|
{
|
||||||
if (instance()->settingsFile() == settingsFile) {
|
if (instance()->settingsFile() == settingsFile) {
|
||||||
qDebug("settings file already set, skipping");
|
qDebug("settings file already set, skipping");
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ public:
|
||||||
Q_ENUM(CoreMode)
|
Q_ENUM(CoreMode)
|
||||||
|
|
||||||
static Settings *instance();
|
static Settings *instance();
|
||||||
static void setSettingFile(const QString &settingsFile = QString());
|
static void setSettingsFile(const QString &settingsFile = QString());
|
||||||
static void setValue(const QString &key = QString(), const QVariant &value = QVariant());
|
static void setValue(const QString &key = QString(), const QVariant &value = QVariant());
|
||||||
static QVariant value(const QString &key = QString());
|
static QVariant value(const QString &key = QString());
|
||||||
static void restoreDefaultSettings();
|
static void restoreDefaultSettings();
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ void CoreArgParser::parse()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_parser.isSet(CoreArgs::configOption)) {
|
if (m_parser.isSet(CoreArgs::configOption)) {
|
||||||
Settings::setSettingFile(m_parser.value(CoreArgs::configOption));
|
Settings::setSettingsFile(m_parser.value(CoreArgs::configOption));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_parser.isSet(CoreArgs::interfaceOption)) {
|
if (m_parser.isSet(CoreArgs::interfaceOption)) {
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ void SettingsTests::initTestCase()
|
||||||
oldSettings.remove();
|
oldSettings.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsTests::setSettingFile()
|
void SettingsTests::setSettingsFile()
|
||||||
{
|
{
|
||||||
Settings::setSettingFile(m_settingsFile);
|
Settings::setSettingsFile(m_settingsFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsTests::settingsFile()
|
void SettingsTests::settingsFile()
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class SettingsTests : public QObject
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void initTestCase();
|
void initTestCase();
|
||||||
// Test are run in order top to bottom
|
// Test are run in order top to bottom
|
||||||
void setSettingFile();
|
void setSettingsFile();
|
||||||
void settingsFile();
|
void settingsFile();
|
||||||
void settingsPath();
|
void settingsPath();
|
||||||
void tlsDir();
|
void tlsDir();
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ void CoreArgParserTests::initTestCase()
|
||||||
if (oldSettings.exists())
|
if (oldSettings.exists())
|
||||||
oldSettings.remove();
|
oldSettings.remove();
|
||||||
|
|
||||||
Settings::setSettingFile(m_settingsFile);
|
Settings::setSettingsFile(m_settingsFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreArgParserTests::interfaceLong()
|
void CoreArgParserTests::interfaceLong()
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ void ScreenTests::initTestCase()
|
||||||
if (oldSettings.exists())
|
if (oldSettings.exists())
|
||||||
oldSettings.remove();
|
oldSettings.remove();
|
||||||
|
|
||||||
Settings::setSettingFile(m_settingsFile);
|
Settings::setSettingsFile(m_settingsFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenTests::basicFunctionality()
|
void ScreenTests::basicFunctionality()
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ int main(int argc, char **argv)
|
||||||
// HACK: Unit tests should not use the filesystem.
|
// HACK: Unit tests should not use the filesystem.
|
||||||
std::filesystem::create_directories(testDir);
|
std::filesystem::create_directories(testDir);
|
||||||
|
|
||||||
Settings::setSettingFile("tmp/test/settings.ini");
|
Settings::setSettingsFile("tmp/test/settings.ini");
|
||||||
Settings::setValue(Settings::Server::ExternalConfig, true);
|
Settings::setValue(Settings::Server::ExternalConfig, true);
|
||||||
|
|
||||||
ExitTimeout exitTimeout(1, "Unit tests");
|
ExitTimeout exitTimeout(1, "Unit tests");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue