From 7b9f3c6c0d994620adcbf9d583cd10fa24e636c3 Mon Sep 17 00:00:00 2001 From: roundedrectangle <129410215+roundedrectangle@users.noreply.github.com> Date: Wed, 25 Mar 2026 18:01:48 +0300 Subject: [PATCH 1/2] Custom links handling --- Opal/About/AboutPageBase.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Opal/About/AboutPageBase.qml b/Opal/About/AboutPageBase.qml index 6d72f8c..b58ee62 100644 --- a/Opal/About/AboutPageBase.qml +++ b/Opal/About/AboutPageBase.qml @@ -696,6 +696,20 @@ Page { sources: sourcesUrl } + /*! + Set this property to false to disable the default behavior of calling \l defaultOpenOrCopyUrl when a link is clicked. You can add your own link handler by implementing onOpenOrCopyUrl signal handler. + + \sa openOrCopyUrl + */ + property bool defaultLinkActions: true + + /*! + This signal is called when a link is clicked. + + \sa defaultLinkActions + */ + signal openOrCopyUrl(url externalUrl,string title) + /*! This function shows a page that lets the user preview an external link (\a externalUrl) before either copying it to the clipboard @@ -706,7 +720,7 @@ Page { \sa Qt::openUrlExternally */ - function openOrCopyUrl(externalUrl, title) { + function defaultOpenOrCopyUrl(externalUrl, title) { L.LinkHandler.openOrCopyUrl(externalUrl, title) } From fae31f9a9c25515130c7cdb5ee676ec8ef9e0588 Mon Sep 17 00:00:00 2001 From: roundedrectangle <129410215+roundedrectangle@users.noreply.github.com> Date: Sun, 21 Jun 2026 22:55:40 +0300 Subject: [PATCH 2/2] AboutPageBase: fix defaultLinkActions --- Opal/About/AboutPageBase.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Opal/About/AboutPageBase.qml b/Opal/About/AboutPageBase.qml index b58ee62..d2fa960 100644 --- a/Opal/About/AboutPageBase.qml +++ b/Opal/About/AboutPageBase.qml @@ -724,6 +724,10 @@ Page { L.LinkHandler.openOrCopyUrl(externalUrl, title) } + onOpenOrCopyUrl: + if (defaultLinkActions) + defaultOpenOrCopyUrl() + allowedOrientations: Orientation.All SilicaFlickable {