mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 22:16:16 +00:00
mobile-widgetes/qml: standardize QML/C++ interface
Do not use a.set_b(value); it works, but it introduces yet another way of using the QML/C++ interface, furthermore the function might not be called set_b in some future, which is the reason the function is define in Q_PROPERTY Use a.b = value, that respects Q_PROPERTY, and is slightly more performant, most importantly it's like all the other settings so noone starts wondering why this is special. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
342a8db93a
commit
d000cb2b0d
1 changed files with 4 additions and 4 deletions
|
@ -461,7 +461,7 @@ Kirigami.ScrollablePage {
|
|||
enabled: PrefUnits.unit_system === "metric"
|
||||
Layout.preferredWidth: gridWidth * 0.25
|
||||
onClicked: {
|
||||
PrefUnits.set_unit_system("imperial")
|
||||
PrefUnits.unit_system = "imperial"
|
||||
manager.changesNeedSaving()
|
||||
manager.refreshDiveList()
|
||||
}
|
||||
|
@ -478,7 +478,7 @@ Kirigami.ScrollablePage {
|
|||
enabled: PrefUnits.unit_system === "imperial"
|
||||
Layout.preferredWidth: gridWidth * 0.25
|
||||
onClicked: {
|
||||
PrefUnits.set_unit_system("metric")
|
||||
PrefUnits.unit_system = "metric"
|
||||
manager.changesNeedSaving()
|
||||
manager.refreshDiveList()
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ Kirigami.ScrollablePage {
|
|||
checked: PrefGeneral.filterFullTextNotes
|
||||
Layout.preferredWidth: gridWidth * 0.25
|
||||
onClicked: {
|
||||
PrefGeneral.set_filterFullTextNotes(checked)
|
||||
PrefGeneral.filterFullTextNotes = checked
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -532,7 +532,7 @@ Kirigami.ScrollablePage {
|
|||
checked: PrefGeneral.filterCaseSensitive
|
||||
Layout.preferredWidth: gridWidth * 0.25
|
||||
onClicked: {
|
||||
PrefGeneral.set_filterCaseSensitive(checked)
|
||||
PrefGeneral.filterCaseSensitive = checked
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue