Diffusion KJots bd0ea6d00f5c

[KJotsEdit] Fix links handling in editing mode

Authored by poboiko on Apr 22 2020, 12:57 PM.

Description

[KJotsEdit] Fix links handling in editing mode

Summary:
When user Ctrl+Clicks on the link in the editing mode, emit the linkClicked signal
(which is forwarded to corresponding slot inside KJotsWidget).

We use mousePressEvent instead of mouseReleaseEvent to be able not to move the cursor
when user ctrl+clicks on the link (so we override default mousePressEvent, which moves it)

Add visual feedback when hovering the mouse over a link with ctrl pressed (change the cursor to pointing hand)
Add visual feedback when simply hovering the mouse over a link (a tooltip)

BUG: 215543
BUG: 218522
BUG: 244846

Test Plan:

  1. Add Link, Ctrl+Click on it: mouse cursor changes, link opens
  2. Right-click on link: there is "Link" entry, which can be used to edit link
  3. Hover mouse over link: a useful tooltip appears telling user how to open it

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: kde-pim

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D29094

Details

Committed
poboikoApr 24 2020, 10:52 AM
Reviewer
dvratil
Differential Revision
D29094: [KJotsEdit] Fix links handling in editing mode
Parents
R573:3d85974591b5: [KJotsTreeView] Fix "copy link address" action
Branches
Unknown
Tags
Unknown