KBookmarks
Open, Needs TriagePublic

Description

KBookmarks has a rather large number of dependencies. Direct dependencies are:

  • KCoreAddons
  • KCodecs
  • KConfig
  • KConfigWidgets
  • KXmlGui

Getting rid of KXmlGui would help getting rid of a lot of indirect dependencies and cut a large branch of KIO's dependency tree.

KXmlGui is used in KBookmarkMenu and KonqBookmarkmenu for KActionCollection only.

Konqbookmarkmenu is only used in Konqueror where, judging by the name, it should live anyway.

KBookmarkMenu needs a complete rewrite.

Maybe an (internal) split into KBookmarksCore and KBookMarkWidgets could make sense

nicolasfella renamed this task from Reduce depenencies of KBookmark to KBookmarks.Nov 16 2019, 11:54 PM
nicolasfella updated the task description. (Show Details)
nicolasfella updated the task description. (Show Details)

Other notes:

  • QDomDocument is used and leaks to the public API. This public API *is used* by keditbookmarks
  • The importers / exporters for the browser are all useless. FF + Chrome use something else.

XBEL is the only relevant part.

There is a qxmlstreamreader of XBEL in kactivitymanagerd, which could be ported.
Interestingly apparently the XBEL parser doesn't work:
https://phabricator.kde.org/D23112#511101

dfaure added a subscriber: dfaure.Nov 23 2019, 12:54 PM

Konqbookmarkmenu is only used in Konqueror => Done, I copied it there and deprecated it in kbookmarks (D25489).

The code in the *importer* files is used by both Konqueror and KEditBookmarks, so that one can't be moved as easily. One solution would be to make keditbookmarks link against libkonq (part of konqueror.git) but I'm not sure that having apps link to each other is good practice? But yeah, an alternative is to kill all importers.

I don't see what part of D23112 makes you conclude that "the XBEL parser doesn't work".
XBEL *is* the native format for konqueror bookmarks (and others, at least at some point in the past), it's not just the format used by user-places.xbel

To get rid of the KXmlGui dep for KActionCollection add getters for the relevant actions so applications can add them to the action collection themselves

nicolasfella moved this task from Backlog to In Progress on the KF6 board.Dec 1 2019, 8:59 PM
ervin moved this task from In Progress to Needs Input on the KF6 board.Mar 27 2021, 1:58 PM

Could the potential core library be useful for Angelfish? @jbbgameich

"KBookmarkMenu needs a complete rewrite" : see comments in konsole's subclass of KBookmarkMenu.
But a new class can be written at any time, before or after KF6 branching.

Could the potential core library be useful for Angelfish? @jbbgameich

As far as I understand it could be used for bookmark import, and maybe also for bookmark storage. Is there anything else that would be interesting?

Other things:

  • The whole toolbar bookmarks concept only applies to Konqueror, so should probably removed from the API
  • Ownership of KBookmarkManager is weird. There's a Q_GLOBAL_STATIC that owns all managers. IIRC that was done because of DBus stuff, but that's no longer relevant