KParts and the Qt5->Qt6 transition

Nicolas Fella nicolas.fella at gmx.de
Wed Dec 6 20:51:20 GMT 2023


Hi,

the transition of many apps to Qt6 provides some challenges for apps
producing and consuming KParts.

KParts are implemented as Qt plugins and as such are specific to the Qt
version they are built against. In other words, a KPart built against
Qt5 cannot be loaded by an app using Qt6 and vice versa.

Since some parts are used by a variety of apps this is causing problems.
When we last discussed this problem the consensus was "Port as many
things as possible and see where we are at then". Now we are approaching
a point where we need to take stock and decide what to do.

  There's several cases to consider:

1) Applications using their own parts without external users. This
happens in PIM where e.g. kmailpart is only used by KMail and Kontact.
No problem here

2) Applications loading specific parts from other applications. These
are easy enough to search for. We have the following cases:

konsolepart (Konsole master is Qt6 only) is used by:

- kdevelop (no Qt6 port)

- konversation (MR with Qt6 port available)

- kile (no Qt6 port)

- Dolphin (already using Qt6)

- Kate (already using Qt6)

- Okteta (Q6 port available)

- Yakuake (already using Qt6)

- Krusader (no Qt6 port)

- Hotspot (extenal, Qt6 port available)

okularpart (Okular is in the process of getting ported):

- kile (no Qt6 port)

- kbibtex (no Qt6 port)

dolphinpart (Dolphin is using Qt6):

- konqueror (already using Qt6)

katepart (available for both Qt5 and Qt6):

- kompare (Qt6 branch available)

kgraphviewerpart (not using Qt6):

- hotspot (external, Qt6 port available)

We do have two options for how to deal with these:

a) Port and release all relevant consumers of a given part at the same time

b) Make sure the part is available for both Qt versions

3) There's a number of "general-purpose file type" parts that aren't
loaded explicitly but based on their mime type. Examples include
gwenviewpart, svgpart, markdownpart, okularpart. There's a number of
applications consuming those:

- Ark for file preview (Qt6 port available but not default yet)

- Kate for file preview (Qt6-only)

- Konqueror

- Krusader

- KBibTex

Here we would ideally have as many as possible available for both Qt
version (as long as we have Qt5-based KParts-consuming software).
However in cases like Ark the loss of functionality by not having
specific parts available would not be catastrophic.

Cheers

Nico



More information about the kde-devel mailing list