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