mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-21 23:35:27 +00:00
Mobile: Fix QML Warnings.
Fix some runtime warnings when running the mobile build caused by binding loops and deprecated handler syntax. Signed-off-by: Michael Keller <mikeller@042.ch>
This commit is contained in:
parent
d9f50bb8e0
commit
a39f0e2891
6 changed files with 22 additions and 15 deletions
|
@ -399,8 +399,6 @@ Kirigami.Page {
|
||||||
delegate: Flickable {
|
delegate: Flickable {
|
||||||
id: internalScrollView
|
id: internalScrollView
|
||||||
width: diveDetailsListView.width
|
width: diveDetailsListView.width
|
||||||
height: diveDetailsListView.height
|
|
||||||
contentHeight: diveDetails.height
|
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
property var modelData: model
|
property var modelData: model
|
||||||
DiveDetailsView {
|
DiveDetailsView {
|
||||||
|
@ -413,7 +411,7 @@ Kirigami.Page {
|
||||||
ScrollIndicator.horizontal: ScrollIndicator { }
|
ScrollIndicator.horizontal: ScrollIndicator { }
|
||||||
Connections {
|
Connections {
|
||||||
target: swipeModel
|
target: swipeModel
|
||||||
onCurrentDiveChanged: {
|
function onCurrentDiveChanged(index) {
|
||||||
currentIndex = index.row
|
currentIndex = index.row
|
||||||
diveDetailsListView.positionViewAtIndex(currentIndex, ListView.End)
|
diveDetailsListView.positionViewAtIndex(currentIndex, ListView.End)
|
||||||
}
|
}
|
||||||
|
@ -425,7 +423,6 @@ Kirigami.Page {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
leftMargin: Kirigami.Units.smallSpacing
|
leftMargin: Kirigami.Units.smallSpacing
|
||||||
rightMargin: Kirigami.Units.smallSpacing
|
rightMargin: Kirigami.Units.smallSpacing
|
||||||
contentHeight: detailsEdit.height
|
|
||||||
// start invisible and scaled down, to get the transition
|
// start invisible and scaled down, to get the transition
|
||||||
// off to the right start
|
// off to the right start
|
||||||
visible: false
|
visible: false
|
||||||
|
|
|
@ -19,7 +19,7 @@ Item {
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: rootItem
|
target: rootItem
|
||||||
onSettingsChanged: {
|
function onSettingsChanged() {
|
||||||
qmlProfile.update()
|
qmlProfile.update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,10 +32,10 @@ Kirigami.ScrollablePage {
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: Backend
|
target: Backend
|
||||||
onLengthChanged: {
|
function onLengthChanged() {
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
onVolumeChanged: {
|
function onVolumeChanged() {
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -318,7 +318,7 @@ Kirigami.Page {
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: manager
|
target: manager
|
||||||
onRestartDownloadSignal: {
|
function onRestartDownloadSignal() {
|
||||||
buttonBar.doDownload()
|
buttonBar.doDownload()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,14 +111,14 @@ TemplatePage {
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: manager
|
target: manager
|
||||||
onUploadFinish: {
|
function onUploadFinish(success, text) {
|
||||||
if (success) {
|
if (success) {
|
||||||
pageStack.pop()
|
pageStack.pop()
|
||||||
}
|
}
|
||||||
statusText.text = text
|
statusText.text = text
|
||||||
progress.value = 0
|
progress.value = 0
|
||||||
}
|
}
|
||||||
onUploadProgress: {
|
function onUploadProgress(percentage) {
|
||||||
progress.value = percentage
|
progress.value = percentage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,10 +110,12 @@ Kirigami.Page {
|
||||||
model: statsManager.var1List
|
model: statsManager.var1List
|
||||||
currentIndex: statsManager.var1Index
|
currentIndex: statsManager.var1Index
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex != statsManager.var1Index) {
|
||||||
statsManager.var1Changed(currentIndex)
|
statsManager.var1Changed(currentIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: i2
|
id: i2
|
||||||
Layout.column: wide ? 0 : 1
|
Layout.column: wide ? 0 : 1
|
||||||
|
@ -127,10 +129,12 @@ Kirigami.Page {
|
||||||
model: statsManager.binner1List
|
model: statsManager.binner1List
|
||||||
currentIndex: statsManager.binner1Index
|
currentIndex: statsManager.binner1Index
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex != statsManager.binner1Index) {
|
||||||
statsManager.var1BinnerChanged(currentIndex)
|
statsManager.var1BinnerChanged(currentIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: i3
|
id: i3
|
||||||
Layout.column: wide ? 0 : 0
|
Layout.column: wide ? 0 : 0
|
||||||
|
@ -145,10 +149,12 @@ Kirigami.Page {
|
||||||
currentIndex: statsManager.var2Index
|
currentIndex: statsManager.var2Index
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex != statsManager.var2Index) {
|
||||||
statsManager.var2Changed(currentIndex)
|
statsManager.var2Changed(currentIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: i4
|
id: i4
|
||||||
Layout.column: wide ? 0 : 1
|
Layout.column: wide ? 0 : 1
|
||||||
|
@ -163,10 +169,12 @@ Kirigami.Page {
|
||||||
currentIndex: statsManager.binner2Index
|
currentIndex: statsManager.binner2Index
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex != statsManager.binner2Index) {
|
||||||
statsManager.var2BinnerChanged(currentIndex)
|
statsManager.var2BinnerChanged(currentIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: i5
|
id: i5
|
||||||
Layout.column: wide ? 0 : 0
|
Layout.column: wide ? 0 : 0
|
||||||
|
@ -181,10 +189,12 @@ Kirigami.Page {
|
||||||
currentIndex: statsManager.operation2Index
|
currentIndex: statsManager.operation2Index
|
||||||
Layout.fillWidth: false
|
Layout.fillWidth: false
|
||||||
onCurrentIndexChanged: {
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex != statsManager.operation2Index) {
|
||||||
statsManager.var2OperationChanged(currentIndex)
|
statsManager.var2OperationChanged(currentIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: i6
|
id: i6
|
||||||
Layout.column: wide ? 0 : 0
|
Layout.column: wide ? 0 : 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue