Skip to content

Fix links in whatsThis help sometimes not working

Felix Ernst requested to merge felixernst/kxmlgui:fix_links_clickable into master

For a while now, the whatsThis() help messages of QActions in QMenus can be invoked not only by highlighting them and then pressing "F1" but also by mouse hovering over them and then pressing "Shift". Unfortunately there is a specific bug that when using "Shift" to show a help message in QMenus, the hyperlinks on that help message won't work correctly. Clicking them will not open the link.

Fortunately there is a painless workaround for this which this commit implements: Triggering the help message also by "F1" makes the links clickable.

The downside is that the help text boxes are placed slightly worse on average which is why this workaround is only used when strictly necessary i.e. when the help contains a hyperlink identified by " href".

An alternative more straightforward implementation of always triggering the help message through "F1" has not only the downside of worse placement but also of the menus closing behind the help message which is why this implementation is preferable.


This fix can be tested using system/dolphin!406 (merged). For example by hovering Help->Dolphin Handbook and then pressing "Shift". The links will open when clicked with this MR applied. I tested this in Plasma X11 and weston.

Merge request reports