diff --git a/src/qml/SettingsPage.qml b/src/qml/SettingsPage.qml index ba9d62f8..c3d7cbf4 100644 --- a/src/qml/SettingsPage.qml +++ b/src/qml/SettingsPage.qml @@ -13,8 +13,6 @@ import org.kde.kirigami 2.12 as Kirigami Kirigami.ScrollablePage { title: i18n("Settings") - property QtObject settings - Kirigami.FormLayout { @@ -28,13 +26,13 @@ Kirigami.ScrollablePage { Controls.SpinBox { id: deleteAfterCount - value: settings.deleteAfterCount + value: _settings.deleteAfterCount enabled: deleteAfterType.currentIndex !== 0 } Controls.ComboBox { id: deleteAfterType - currentIndex: settings.deleteAfterType + currentIndex: _settings.deleteAfterType model: [i18n("Never"), i18n("Articles"), i18n("Days"), i18n("Weeks"), i18n("Months")] } } @@ -48,7 +46,7 @@ Kirigami.ScrollablePage { id: articleFontSizeSpinBox enabled: !useSystemFontCheckBox.checked - value: settings.articleFontSize + value: _settings.articleFontSize Kirigami.FormData.label: i18n("Font size:") from: 6 to: 20 @@ -56,18 +54,18 @@ Kirigami.ScrollablePage { Controls.CheckBox { id: useSystemFontCheckBox - checked: settings.articleFontUseSystem + checked: _settings.articleFontUseSystem text: i18n("Use system default") } Controls.Button { text: i18n("Save") onClicked: { - settings.deleteAfterCount = deleteAfterCount.value - settings.deleteAfterType = deleteAfterType.currentIndex - settings.articleFontSize = articleFontSizeSpinBox.value - settings.articleFontUseSystem = useSystemFontCheckBox.checked - settings.save() + _settings.deleteAfterCount = deleteAfterCount.value + _settings.deleteAfterType = deleteAfterType.currentIndex + _settings.articleFontSize = articleFontSizeSpinBox.value + _settings.articleFontUseSystem = useSystemFontCheckBox.checked + _settings.save() pageStack.pop() } } diff --git a/src/qml/main.qml b/src/qml/main.qml index 1e269c02..22a1231b 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -22,7 +22,7 @@ Kirigami.ApplicationWindow { Kirigami.Action { text: i18n("Settings") iconName: "settings-configure" - onTriggered: pageStack.layers.push("qrc:/SettingsPage.qml", {"settings": _settings}) + onTriggered: pageStack.layers.push("qrc:/SettingsPage.qml") enabled: pageStack.layers.currentItem.title !== i18n("Settings") }, Kirigami.Action {