Skip to content

Commit

Permalink
Make all onLinkActivated proper functions with parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Mar 14, 2024
1 parent 7afa1b9 commit b75cc5b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/qml/Changelog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Popup {
}
}

onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => { Qt.openUrlExternally(link) }
}

BusyIndicator {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/FeatureForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Page {
opacity: textLabel.opacity
color: Theme.mainTextColor
linkColor: Theme.mainColor
onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => { Qt.openUrlExternally(link) }
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/qml/QFieldCloudLogin.qml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Item {
wrapMode: Text.WordWrap
visible: cloudConnection.status === QFieldCloudConnection.Disconnected

onLinkActivated: {
onLinkActivated: (link) => {
browserPopup.url = link
browserPopup.fullscreen = true
browserPopup.open()
Expand All @@ -213,7 +213,7 @@ Item {
textFormat: Text.RichText
wrapMode: Text.WordWrap

onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => { Qt.openUrlExternally(link) }
}

Item {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/QFieldCloudPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Popup {
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter

onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => { Qt.openUrlExternally(link) }
}

Item {
Expand Down
4 changes: 2 additions & 2 deletions src/qml/QFieldSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ Page {
wrapMode: Text.WordWrap
Layout.fillWidth: true

onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => { Qt.openUrlExternally(link) }
}

Label {
Expand Down Expand Up @@ -568,7 +568,7 @@ Page {
wrapMode: Text.WordWrap
Layout.fillWidth: true

onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => { Qt.openUrlExternally(link) }
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/qml/editorwidgets/TextEdit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ EditorWidgetBase {
? config['UseHtml'] === true ? value : stringUtilities.insertLinks(value)
: stringUtilities.insertLinks(value).replace('\n','')

onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => { Qt.openUrlExternally(link) }
}

TextField {
Expand Down

0 comments on commit b75cc5b

Please sign in to comment.