mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Parse html links in the Notes section.
In the spirit of "Do the simplest thing that could possibly work": capture Ctrl+leftclick mouse events in the Notes area. If the string under the clicked position is a valid url, then launch it. Many common URI schemes will work. Typing a url that starts with https:// will work. So will mailto: and file:// See #733 Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
99ed01e571
commit
0a2f5d25c0
3 changed files with 178 additions and 0 deletions
|
@ -195,6 +195,9 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
connect(ui.diveNotesMessage, &KMessageWidget::showAnimationFinished,
|
||||
ui.location, &DiveLocationLineEdit::fixPopupPosition);
|
||||
|
||||
// enable URL clickability in notes:
|
||||
new TextHyperlinkEventFilter(ui.notes);//destroyed when ui.notes is destroyed
|
||||
|
||||
acceptingEdit = false;
|
||||
|
||||
ui.diveTripLocation->hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue