I setup Konqueror so that it embeds PDF files using Okular part instead of opening them in the Okular application. However, with the KF6 versions of both Konqueror and Okular, this doesn't work: clicking on a PDF file results in Okular being launched. This happens because Konqueror uses KParts::PartLoader::partsForMimeType("application/pdf") and (at least on my system) the returned list doesn't contain "okularpart", despite Okular being installed and okularpart.so existing in the system. I think this is caused by two factors: - okularpart.so (at least on my system) is installed in /usr/lib64/qt6/plugins, while other parts (dolphinpart.so, arkpart.so and katepart.so) are installed in /usr/lib64/qt6/plugins/kf6/parts - okular_part.json only lists application/vnd.kde.okular-archive as mimetype After adding "application/pdf" to the list of mimetypes in okular_part.json, recompiling Okular and moving (actually, linking) okularpart.so to /usr/lib64/qt6/plugins/kf6/parts made KParts::PartLoader::partsForMimeType find okularpart correctly. I think that this problem doesn't only happen for PDFs but also for the other mimetypes supported by okularpart but not explicitly listed in okular_part.json. Note: in the bug report, I chose "Gentoo Packages" as platform: however, since the official Gentoo repository doesn't currently have packages for the KF6 versions of Okular and Konqueror, I installed them from the Gentoo KDE overlay (https://github.com/gentoo-mirror/kde.git).
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/900
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kparts/-/merge_requests/82
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/902
Git commit 55901afcc3a0d42dbec216ec43426dd6c8e3a2fd by Sune Vuorela. Committed on 09/01/2024 at 11:10. Pushed by sune into branch 'master'. Install parts into the right folder M +1 -2 CMakeLists.txt https://invent.kde.org/graphics/okular/-/commit/55901afcc3a0d42dbec216ec43426dd6c8e3a2fd
Git commit dbb8ba635e48650b2ed8c84168c79e53e619ea0f by Sune Vuorela. Committed on 09/01/2024 at 19:19. Pushed by sune into branch 'master'. Communicate our plugin namespace to consumers This enables others to query our supported mimetypes and thus figure out what mimetypes they can open with the okular part It is needed for kpart loading to know which features we can actually do M +3 -0 okular_part.json https://invent.kde.org/graphics/okular/-/commit/dbb8ba635e48650b2ed8c84168c79e53e619ea0f
Git commit 671107c0e53daf80065708daab7505d8f1a36371 by Sune Vuorela. Committed on 09/01/2024 at 19:17. Pushed by sune into branch 'master'. KParts can extend their mimetypes with plugins Certain KParts can extend their mimetypes with plugins This feature was kind of lost in the KF6 porting that dropped the desktop files. Look for a key in the json file to see what plugins to look for for extra mimetypes. M +13 -3 src/partloader.cpp https://invent.kde.org/frameworks/kparts/-/commit/671107c0e53daf80065708daab7505d8f1a36371