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 { ...@@ -169,8 +169,9 @@ Component {
target: settings target: settings
/* TODO - Must be replaced via better solution in the future. */ /* TODO - Must be replaced via better solution in the future. */
onSaveSettingsGeneralResponse: { onSaveSettingsGeneralResponse: {
settings.updateSettingsGeneral(sLang, settings.updateSettingsGeneral(sLang,
fontSizeSpinBox.val().toString()) fontSizeSpinBox.val().toString())
settings.saveAllSettings()
pageView.pop(StackView.Immediate) pageView.pop(StackView.Immediate)
} }
} }
......
...@@ -176,6 +176,7 @@ Component { ...@@ -176,6 +176,7 @@ Component {
} else { } else {
errLineText.visible = false errLineText.visible = false
settings.updatePinSettings(pinConfirmField1.text.toString()) settings.updatePinSettings(pinConfirmField1.text.toString())
settings.saveAllSettings()
pageView.pop(StackView.Immediate) pageView.pop(StackView.Immediate)
} }
/* change current pin code */ /* change current pin code */
...@@ -197,6 +198,7 @@ Component { ...@@ -197,6 +198,7 @@ Component {
} else { } else {
errLineText.visible = false errLineText.visible = false
settings.updatePinSettings(pinConfirmField1.text.toString()) settings.updatePinSettings(pinConfirmField1.text.toString())
settings.saveAllSettings()
pageView.pop(StackView.Immediate) pageView.pop(StackView.Immediate)
} }
} else { } else {
...@@ -210,6 +212,7 @@ Component { ...@@ -210,6 +212,7 @@ Component {
if (pinValueField.text == currentPIN) { if (pinValueField.text == currentPIN) {
errLineText.visible = false errLineText.visible = false
settings.updatePinSettings("") settings.updatePinSettings("")
settings.saveAllSettings()
settings.setInactivityInterval(0) settings.setInactivityInterval(0)
locker.setInactivityInterval(0) locker.setInactivityInterval(0)
pageView.pop(StackView.Immediate) pageView.pop(StackView.Immediate)
......
...@@ -227,10 +227,11 @@ Component { ...@@ -227,10 +227,11 @@ Component {
target: settings target: settings
/* TODO - Must be replaced via better solution in the future. */ /* TODO - Must be replaced via better solution in the future. */
onSaveSettingsStorageResponse: { onSaveSettingsStorageResponse: {
settings.updateSettingsStorage( settings.updateSettingsStorage(
messageLifeSpinBox.val().toString(), messageLifeSpinBox.val().toString(),
attachLifeSpinBox.val().toString(), attachLifeSpinBox.val().toString(),
dbPathText.text.toString()) dbPathText.text.toString())
settings.saveAllSettings()
pageView.pop(StackView.Immediate) pageView.pop(StackView.Immediate)
} }
} }
......
...@@ -124,9 +124,10 @@ Component { ...@@ -124,9 +124,10 @@ Component {
target: settings target: settings
/* TODO - Must be replaced via better solution in the future. */ /* TODO - Must be replaced via better solution in the future. */
onSaveSettingsSyncResponse: { onSaveSettingsSyncResponse: {
settings.updateSettingsSync( settings.updateSettingsSync(
idownloadOnlyNewMsgs.checked, idownloadOnlyNewMsgs.checked,
idownloadCompleteMsgs.checked) idownloadCompleteMsgs.checked)
settings.saveAllSettings()
pageView.pop(StackView.Immediate) pageView.pop(StackView.Immediate)
} }
} }
......
...@@ -113,7 +113,6 @@ void GlobalSettingsQmlWrapper::updateSettingsGeneral(const QString &language, ...@@ -113,7 +113,6 @@ void GlobalSettingsQmlWrapper::updateSettingsGeneral(const QString &language,
{ {
globSet.language = language; globSet.language = language;
globSet.fontSize = fontSize.toInt(); globSet.fontSize = fontSize.toInt();
saveAllSettings();
} }
...@@ -127,7 +126,6 @@ void GlobalSettingsQmlWrapper::updateSettingsSync(bool downloadOnlyNewMsgs, ...@@ -127,7 +126,6 @@ void GlobalSettingsQmlWrapper::updateSettingsSync(bool downloadOnlyNewMsgs,
{ {
globSet.downloadOnlyNewMsgs = downloadOnlyNewMsgs; globSet.downloadOnlyNewMsgs = downloadOnlyNewMsgs;
globSet.downloadCompleteMsgs = downloadCompleteMsgs; globSet.downloadCompleteMsgs = downloadCompleteMsgs;
saveAllSettings();
} }
...@@ -142,7 +140,6 @@ void GlobalSettingsQmlWrapper::updateSettingsStorage(const QString &msgLifeDays, ...@@ -142,7 +140,6 @@ void GlobalSettingsQmlWrapper::updateSettingsStorage(const QString &msgLifeDays,
globSet.msgLifeTimeInDays = msgLifeDays.toInt(); globSet.msgLifeTimeInDays = msgLifeDays.toInt();
globSet.fileLifeTimeInDays = fileLifeDays.toInt(); globSet.fileLifeTimeInDays = fileLifeDays.toInt();
globSet.dbsLocation = dbPath; globSet.dbsLocation = dbPath;
saveAllSettings();
} }
...@@ -175,8 +172,6 @@ void GlobalSettingsQmlWrapper::updatePinSettings(const QString &pinValue) ...@@ -175,8 +172,6 @@ void GlobalSettingsQmlWrapper::updatePinSettings(const QString &pinValue)
globSet.pinSalt.clear(); globSet.pinSalt.clear();
globSet.pinCode.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