Bug 467130

Summary: When libkxmlgui gets loaded into a non-qt app it may mess up application's shortcut fremework.
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: Alexander Golubev (Fat-Zer) <fatzer2>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

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