Skip to content

Commit 4629985

Browse files
fix(dialogs): use open_url for clickable links in About and Update dialogs
setOpenExternalLinks uses QDesktopServices internally, which fails in AppImage due to LD_LIBRARY_PATH modification. Replace with linkActivated / anchorClicked signals routed through our open_url() helper.
1 parent c1660fb commit 4629985

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/ui/dialogs/about_dialog.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ def _build_info_column(self) -> QVBoxLayout:
243243

244244
github_label = QLabel(f'GitHub: <a href="{_GITHUB_URL}" style="color: {_TEXT_LINK};">{_GITHUB_URL}</a>')
245245
github_label.setTextFormat(Qt.TextFormat.RichText)
246-
github_label.setOpenExternalLinks(True)
246+
github_label.setCursor(Qt.CursorShape.PointingHandCursor)
247+
github_label.linkActivated.connect(lambda url: open_url(url))
247248
github_label.setStyleSheet("font-size: 12px;")
248249
col.addWidget(github_label)
249250

src/ui/dialogs/update_dialog.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from src.ui.widgets.ui_helper import UIHelper
2323
from src.ui.widgets.base_dialog import BaseDialog
2424
from src.utils.i18n import t
25+
from src.utils.open_url import open_url
2526
from src.version import __version__
2627

2728
__all__ = ["UpdateDialog"]
@@ -78,7 +79,8 @@ def _build_content(self, content_area: QVBoxLayout) -> None:
7879
self._notes_browser = QTextBrowser()
7980
self._notes_browser.setMarkdown(self._info.release_notes)
8081
self._notes_browser.setMinimumHeight(200)
81-
self._notes_browser.setOpenExternalLinks(True)
82+
self._notes_browser.setOpenExternalLinks(False)
83+
self._notes_browser.anchorClicked.connect(lambda url: open_url(url.toString()))
8284
content_area.addWidget(self._notes_browser)
8385

8486
# Progress bar (hidden initially)

0 commit comments

Comments
 (0)