diff options
author | K. \"pestophagous\" Heller <pestophagous@gmail.com> | 2015-11-15 20:56:24 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-15 22:22:53 -0800 |
commit | 0a2f5d25c0cc246752db613a175bcd5416040a45 (patch) | |
tree | c5e6d48e4953a59815256fb5b8bdc52dc791ca1e /desktop-widgets/maintab.cpp | |
parent | 99ed01e5710840976890551da4b02e630a8abee3 (diff) | |
download | subsurface-0a2f5d25c0cc246752db613a175bcd5416040a45.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/maintab.cpp')
-rw-r--r-- | desktop-widgets/maintab.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp index 96dfb7ce1..da918c633 100644 --- a/desktop-widgets/maintab.cpp +++ b/desktop-widgets/maintab.cpp @@ -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(); |