[KJots] Fix bookmarks actions
ClosedPublic

Authored by poboiko on Apr 12 2020, 2:56 PM.

Details

Summary

This patch ports KJots from deprecated KBookmarksMenu API (see D25660: Decouple KBookmarksMenu from KActionCollection).

On my machine, it also fixes a crash (bm_action was null for some reason,
I did not investigate it though).

It also fixes the shortcuts collision (action->setShortcut was not enough,
one also needs to run actionCollection->setDefaultShortcut).

BUG: 384000

Test Plan
  1. Start KJots
  2. It don't crash, and Ambiguous shortcuts dialog does not appear)
  3. Open Bookmarks menu, the shortcut is Ctrl+Shift+B.

Diff Detail

Repository
R573 KJots
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25109
Build 25127: arc lint + arc unit
poboiko created this revision.Apr 12 2020, 2:56 PM
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 12 2020, 2:56 PM
poboiko requested review of this revision.Apr 12 2020, 2:56 PM

Would you like to take over maintainership for KJots? I thought KJots was in the unmaintained pile.

as to the code, it looks fine. no point though, unless we have someone looking after the application itself.

dvratil accepted this revision.Apr 18 2020, 7:31 PM
This revision is now accepted and ready to land.Apr 18 2020, 7:31 PM

Would you like to take over maintainership for KJots? I thought KJots was in the unmaintained pile.

It is, and I wanted to try to revive it a bit. It seems like a decent application with nice functionality, although a bit buggy (as a result of being unmaintained). That's also one of the reasons I've sent couple of patches to KTextWidgets/KRichTextEdit.

I'm not sure that I'm qualified to maintain it, though. I'm getting myself familiar with the code base, and for now I would really appreciate if someone from the PIM team would help me with that and look at my patches. One small step at a time :)

poboiko closed this revision.Apr 18 2020, 10:06 PM

Without ifdefs this is effectively raising minimum KF5 dependency to >=5.69:

src/kjotswidget.cpp:360:40: error: no matching function for call to ‘KBookmarkMenu::KBookmarkMenu(KBookmarkManager*, KJotsBookmarks*&, QMenu*)’

Without ifdefs this is effectively raising minimum KF5 dependency to >=5.69:

src/kjotswidget.cpp:360:40: error: no matching function for call to ‘KBookmarkMenu::KBookmarkMenu(KBookmarkManager*, KJotsBookmarks*&, QMenu*)’

Right, sorry, haven't thought of it.

@dvratil Is it OK do increase the dependency version, or should I add ifdefs?

@poboiko just bump the dependency