refactor: settings, use state not settings in the log when changing the state file
This commit is contained in:
parent
60d5bb8378
commit
fa78b957b5
1 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ void Settings::setSettingsFile(const QString &settingsFile)
|
||||||
void Settings::setStateFile(const QString &stateFile)
|
void Settings::setStateFile(const QString &stateFile)
|
||||||
{
|
{
|
||||||
if (instance()->m_stateSettings->fileName() == stateFile) {
|
if (instance()->m_stateSettings->fileName() == stateFile) {
|
||||||
qDebug("settings file already set, skipping");
|
qDebug("state file already set, skipping");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,7 +48,7 @@ void Settings::setStateFile(const QString &stateFile)
|
||||||
instance()->m_stateSettings->deleteLater();
|
instance()->m_stateSettings->deleteLater();
|
||||||
|
|
||||||
instance()->m_stateSettings = new QSettings(stateFile, QSettings::IniFormat, instance());
|
instance()->m_stateSettings = new QSettings(stateFile, QSettings::IniFormat, instance());
|
||||||
qInfo().noquote() << "settings file changed:" << instance()->m_stateSettings->fileName();
|
qInfo().noquote() << "state file changed:" << instance()->m_stateSettings->fileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings::Settings(QObject *parent) : QObject(parent)
|
Settings::Settings(QObject *parent) : QObject(parent)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue