Bug 244846

Summary: links in the book page aren't working
Product: [Unmaintained] kjots Reporter: Ludwig Reiter <ludwig.reiter>
Component: generalAssignee: Stephen Kelly <steveire>
Status: RESOLVED FIXED    
Severity: minor CC: anderslund, bjoern.ricks, fedotov.i.f
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ludwig Reiter 2010-07-16 12:19:37 UTC
Version:           unspecified (using Devel) 
OS:                Linux

links in the book page aren't working

Reproducible: Always

Steps to Reproduce:
1. Create a book with two long test pages.
2. Select the book.
3. Click on a link (book or page link)

Actual Results:  
Nothing happens.
(output:
kdeinit4: preparing to launch /usr/bin/xdg-open
xdg-open: file '#book_100' does not exist)

Expected Results:  
Should scroll to the right place in the page.
Comment 1 Ludwig Reiter 2010-08-13 13:53:44 UTC
In the 2010-08-05 tag this isn't working, too.
I have a short look at the source.
Here a suggestion (Just a guess)
Perhaps it is better to use the QTextBrowser "openLinks" property insted of set an invalid source in KJotsBrowser::linkClicked
Comment 2 Anders Lund 2010-11-09 22:46:48 UTC
I find internal links working (4.5.3), but only if i click them in the readonly mode, activated by clicking the containg book.

I think there should be a way to activate links in editing mode, or alternatively a way to switch to reading mode for a single page.
Comment 3 Igor Poboiko 2020-04-24 10:52:15 UTC
Git commit bd0ea6d00f5c73bfe9c58c929db863a67b6aedb5 by Igor Poboiko.
Committed on 24/04/2020 at 10:52.
Pushed by poboiko into branch 'master'.

[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)
Related: bug 215543, bug 218522

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

M  +70   -15   src/kjotsedit.cpp
M  +12   -2    src/kjotsedit.h
M  +1    -0    src/kjotswidget.cpp

https://commits.kde.org/kjots/bd0ea6d00f5c73bfe9c58c929db863a67b6aedb5