Commit 2e6dad02 authored by Martin Straka's avatar Martin Straka

Added onDestruction action into some pages where is needed

parent aa5fc97e
......@@ -46,6 +46,10 @@ Component {
setAccountDetailInfo(userName)
}
Component.onDestruction: {
statusBar.visible = false
}
PageHeader {
id: headerBar
title: qsTr("Account info")
......@@ -55,7 +59,6 @@ Component {
anchors.bottom: parent.bottom
width: parent.width * backMouseAreaRatio
onClicked: {
statusBar.visible = false
pageView.pop(StackView.Immediate)
}
}
......
......@@ -53,6 +53,11 @@ Item {
}
proxyDataboxModel.setSourceModel(foundBoxModel)
}
Component.onDestruction: {
statusBar.visible = false
}
DataboxListModel {
id: foundBoxModel
Component.onCompleted: {
......@@ -74,7 +79,6 @@ Item {
anchors.bottom: parent.bottom
width: parent.width * backMouseAreaRatio
onClicked: {
statusBar.visible = false
pageView.pop(StackView.Immediate)
}
}
......
......@@ -57,6 +57,11 @@ Item {
searchPhraseText.forceActiveFocus()
proxyDataboxModel.setSourceModel(foundBoxModel)
}
Component.onDestruction: {
statusBar.visible = false
}
DataboxListModel {
id: foundBoxModel
Component.onCompleted: {
......@@ -79,7 +84,6 @@ Item {
anchors.bottom: parent.bottom
width: parent.width * backMouseAreaRatio
onClicked: {
statusBar.visible = false
pageView.pop(StackView.Immediate)
}
}
......
......@@ -41,9 +41,15 @@ Item {
property var statusBar
property int soughtMsgType: MessageType.TYPE_RECEIVED | MessageType.TYPE_SENT
Component.onCompleted: {
searchPhraseText.forceActiveFocus()
}
Component.onDestruction: {
statusBar.visible = false
}
MessageListModel {
id: messageModel
Component.onCompleted: {
......@@ -58,7 +64,6 @@ Item {
anchors.bottom: parent.bottom
width: parent.width * backMouseAreaRatio
onClicked: {
statusBar.visible = false
pageView.pop(StackView.Immediate)
}
}
......
......@@ -144,6 +144,10 @@ Item {
}
}
Component.onDestruction: {
statusBar.visible = false
}
/* File dialog for choose of files from the storage */
FileDialogue {
id: fileDialogue
......@@ -193,7 +197,6 @@ Item {
anchors.bottom: parent.bottom
width: parent.width * backMouseAreaRatio
onClicked: {
statusBar.visible = false
pageView.pop(StackView.Immediate)
}
}
......
......@@ -39,6 +39,7 @@ Item {
property bool isNewAccount: (userName == "")
property string sLoginMethod: "pwd"
Component.onCompleted: {
if (!isNewAccount) {
accounts.getAccountData(userName)
......
......@@ -45,6 +45,11 @@ Item {
languageComboBoxId.currentIndex = langugeComboBoxIndex
fontSizeSpinBox.setVal(settings.fontSize())
}
Component.onDestruction: {
settings.saveAllSettings(accountModel)
}
PageHeader {
id: headerBar
title: qsTr("General settings")
......@@ -54,7 +59,6 @@ Item {
anchors.bottom: parent.bottom
width: parent.width * backMouseAreaRatio
onClicked: {
settings.saveAllSettings(accountModel)
pageView.pop(StackView.Immediate)
}
}
......
......@@ -49,6 +49,14 @@ Item {
zfoDbSizeSpinBox.value = currentZfoSize
dbPathText.text = settings.dbPath()
}
Component.onDestruction: {
settings.saveAllSettings(accountModel)
if (currentZfoSize > zfoDbSizeSpinBox.value) {
zfo.reduceZfoDbSize(currentZfoSize-zfoDbSizeSpinBox.value);
}
}
PageHeader {
id: headerBar
title: qsTr("Storage settings")
......@@ -58,10 +66,6 @@ Item {
anchors.bottom: parent.bottom
width: parent.width * backMouseAreaRatio
onClicked: {
settings.saveAllSettings(accountModel)
if (currentZfoSize > zfoDbSizeSpinBox.value) {
zfo.reduceZfoDbSize(currentZfoSize-zfoDbSizeSpinBox.value);
}
pageView.pop(StackView.Immediate)
}
}
......
......@@ -38,6 +38,11 @@ Item {
downloadOnlyNewMsgs.checked = settings.downloadOnlyNewMsgs()
downloadCompleteMsgs.checked = settings.downloadCompleteMsgs()
}
Component.onDestruction: {
settings.saveAllSettings(accountModel)
}
PageHeader {
id: headerBar
title: qsTr("Synchronization settings")
......@@ -47,7 +52,6 @@ Item {
anchors.bottom: parent.bottom
width: parent.width * backMouseAreaRatio
onClicked: {
settings.saveAllSettings(accountModel)
pageView.pop(StackView.Immediate)
}
}
......
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