Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_0] Fix a bunch of QML warnings #4728

Merged
merged 3 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/qml/QFieldLocalDataPickerScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ Page {
property Item pressedItem
anchors.fill: parent
anchors.rightMargin: 48
onClicked: {
onClicked: (mouse) => {
if (itemMenu.visible) {
itemMenu.close();
} else if (importMenu.visible) {
Expand All @@ -283,7 +283,7 @@ Page {
}
}
}
onPressed: {
onPressed: (mouse) => {
if (itemMenu.visible || importMenu.visible)
return;

Expand All @@ -309,7 +309,7 @@ Page {
}
}

onPressAndHold: {
onPressAndHold: (mouse) => {
var item = table.itemAt(
table.contentX + mouse.x,
table.contentY + mouse.y
Expand Down
4 changes: 2 additions & 2 deletions src/qml/imports/QFieldControls/+Qt6/CodeReader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ Popup {
iconColor: "white"
bgcolor: Theme.darkGraySemiOpaque

visible: settings.cameraActive && cameraLoader.item.camera.isTorchModeSupported(Camera.TorchOn)
state: cameraLoader.item.camera.torchMode === Camera.TorchOn ? "On" : "Off"
visible: settings.cameraActive && cameraLoader.active && cameraLoader.item.camera.isTorchModeSupported(Camera.TorchOn)
state: cameraLoader.active && cameraLoader.item.camera.torchMode === Camera.TorchOn ? "On" : "Off"
states: [
State {
name: "Off"
Expand Down
6 changes: 3 additions & 3 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ ApplicationWindow {
state: "browse"
}

onChangeMode: {
if ( stateMachine.state == mode )
onChangeMode: (mode) => {
if ( stateMachine.state === mode )
return

stateMachine.lastState = stateMachine.state
Expand Down Expand Up @@ -1262,7 +1262,7 @@ ApplicationWindow {
CloseTool {
id: abortRequestGeometry
visible: digitizingToolbar.geometryRequested
toolImage: Theme.getThemeVectorIcon( "ic_edit_geometry_white" )
toolImage: Theme.getThemeIcon( "ic_edit_geometry_white" )
toolText: qsTr( 'Cancel addition' )
onClosedTool: digitizingToolbar.cancel()
}
Expand Down
Loading