Commit ca686d89 authored by Karel Slaný's avatar Karel Slaný

Calling saveAllSettings() exclusively from QML and from main().

parent 63b2e8ff
......@@ -169,8 +169,9 @@ Component {
target: settings
/* TODO - Must be replaced via better solution in the future. */
onSaveSettingsGeneralResponse: {
settings.updateSettingsGeneral(sLang,
settings.updateSettingsGeneral(sLang,
fontSizeSpinBox.val().toString())
settings.saveAllSettings()
pageView.pop(StackView.Immediate)
}
}
......
......@@ -176,6 +176,7 @@ Component {
} else {
errLineText.visible = false
settings.updatePinSettings(pinConfirmField1.text.toString())
settings.saveAllSettings()
pageView.pop(StackView.Immediate)
}
/* change current pin code */
......@@ -197,6 +198,7 @@ Component {
} else {
errLineText.visible = false
settings.updatePinSettings(pinConfirmField1.text.toString())
settings.saveAllSettings()
pageView.pop(StackView.Immediate)
}
} else {
......@@ -210,6 +212,7 @@ Component {
if (pinValueField.text == currentPIN) {
errLineText.visible = false
settings.updatePinSettings("")
settings.saveAllSettings()
settings.setInactivityInterval(0)
locker.setInactivityInterval(0)
pageView.pop(StackView.Immediate)
......
......@@ -227,10 +227,11 @@ Component {
target: settings
/* TODO - Must be replaced via better solution in the future. */
onSaveSettingsStorageResponse: {
settings.updateSettingsStorage(
settings.updateSettingsStorage(
messageLifeSpinBox.val().toString(),
attachLifeSpinBox.val().toString(),
dbPathText.text.toString())
settings.saveAllSettings()
pageView.pop(StackView.Immediate)
}
}
......
......@@ -124,9 +124,10 @@ Component {
target: settings
/* TODO - Must be replaced via better solution in the future. */
onSaveSettingsSyncResponse: {
settings.updateSettingsSync(
settings.updateSettingsSync(
idownloadOnlyNewMsgs.checked,
idownloadCompleteMsgs.checked)
settings.saveAllSettings()
pageView.pop(StackView.Immediate)
}
}
......
......@@ -113,7 +113,6 @@ void GlobalSettingsQmlWrapper::updateSettingsGeneral(const QString &language,
{
globSet.language = language;
globSet.fontSize = fontSize.toInt();
saveAllSettings();
}
......@@ -127,7 +126,6 @@ void GlobalSettingsQmlWrapper::updateSettingsSync(bool downloadOnlyNewMsgs,
{
globSet.downloadOnlyNewMsgs = downloadOnlyNewMsgs;
globSet.downloadCompleteMsgs = downloadCompleteMsgs;
saveAllSettings();
}
......@@ -142,7 +140,6 @@ void GlobalSettingsQmlWrapper::updateSettingsStorage(const QString &msgLifeDays,
globSet.msgLifeTimeInDays = msgLifeDays.toInt();
globSet.fileLifeTimeInDays = fileLifeDays.toInt();
globSet.dbsLocation = dbPath;
saveAllSettings();
}
......@@ -175,8 +172,6 @@ void GlobalSettingsQmlWrapper::updatePinSettings(const QString &pinValue)
globSet.pinSalt.clear();
globSet.pinCode.clear();
}
saveAllSettings();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment