More formal declaration of arguments in signal handlers

This commit is contained in:
Bart De Vries 2023-09-28 14:33:14 +02:00
parent fa40d2b4c6
commit 19dc371084
5 changed files with 9 additions and 5 deletions

View File

@ -490,7 +490,7 @@ FocusScope {
onLinkHovered: {
cursorShape: Qt.PointingHandCursor;
}
onLinkActivated: {
onLinkActivated: (link) => {
if (link.split("://")[0] === "timestamp") {
if (AudioManager.entry && AudioManager.entry.enclosure) {
AudioManager.seek(link.split("://")[1]);

View File

@ -241,7 +241,7 @@ Kirigami.ScrollablePage {
font.pointSize: SettingsManager && !(SettingsManager.articleFontUseSystem) ? SettingsManager.articleFontSize : Kirigami.Theme.defaultFont.pointSize
color: Kirigami.Theme.textColor
onLinkActivated: {
onLinkActivated: (link) => {
if (link.split("://")[0] === "timestamp") {
if (AudioManager.entry && AudioManager.entry.enclosure && entry.enclosure && (entry.enclosure.status === Enclosure.Downloaded || SettingsManager.prioritizeStreaming)) {
if (AudioManager.entry !== entry) {

View File

@ -293,7 +293,9 @@ Kirigami.ScrollablePage {
selectByMouse: !Kirigami.Settings.isMobile
textFormat:TextEdit.RichText
text: "<a href='%1'>%1</a>".arg(feed.link)
onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => {
Qt.openUrlExternally(link);
}
wrapMode: Text.WordWrap
Layout.fillWidth: true
color: Kirigami.Theme.textColor

View File

@ -194,7 +194,7 @@ Kirigami.Page {
onLinkHovered: {
cursorShape: Qt.PointingHandCursor;
}
onLinkActivated: {
onLinkActivated: (link) => {
if (link.split("://")[0] === "timestamp") {
if (AudioManager.entry && AudioManager.entry.enclosure) {
AudioManager.seek(link.split("://")[1]);

View File

@ -308,7 +308,9 @@ Kirigami.ScrollablePage {
readOnly: true
wrapMode: Text.WordWrap
textFormat: Text.RichText
onLinkActivated: Qt.openUrlExternally(link)
onLinkActivated: (link) => {
Qt.openUrlExternally(link);
}
text: Sync.provider === Sync.GPodderNextcloud ?
i18nc("argument is a weblink", "Sync with a Nextcloud server that has the GPodder Sync app installed: %1.<br/>It is advised to manually create an app password for Kasts through the web interface and use those credentials." , "<a href=\"https://apps.nextcloud.com/apps/gpoddersync\">https://apps.nextcloud.com/apps/gpoddersync</a>") :
i18nc("argument is a weblink", "If you don't already have an account, you should first create one at %1", "<a href=\"https://gpodder.net\">https://gpodder.net</a>")