Bug 467130 - When libkxmlgui gets loaded into a non-qt app it may mess up application's shortcut fremework.
Summary: When libkxmlgui gets loaded into a non-qt app it may mess up application's sh...
Status: REPORTED
Alias: None
Product: frameworks-kxmlgui
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-09 22:21 UTC by Alexander Golubev (Fat-Zer)
Modified: 2023-03-09 22:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Golubev (Fat-Zer) 2023-03-09 22:21:39 UTC
SUMMARY

When libkxmlgui gets loaded into a non-kde qt app it may mess up application's shortcut framework. This happens because libkxmlgui installs[1] an event filter, which tries to handle shortcuts on its own. Besides it's a quiet dirty practice in general to mess with others global objects with upon lib bootstrap, there are some legit reasons when a non-kde app may load a kde library. i.e. that may happen because the app depends upon a library with optional kde support or via Qt plugin system.

The later one is what exactly happened in freecad[2].

So could you please change the libkxmlgui behaviour so it won't install the event filter on library load or at least do it just for kde apps?

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Gentoo/Linux kernel 5.15.88
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

[1]: https://github.com/KDE/kxmlgui/blob/master/src/kactionconflictdetector.cpp
[2]: https://github.com/FreeCAD/FreeCAD/issues/8708#issuecomment-1456471966