Skip to content

Fix crash of KMix in Legacy Tray

The main change of this commit is the replacement of a static_cast with a qobject_cast.

The code assumed falsely that QEvent::ToolTips are only ever sent to QWidgets. While the documentation implies that, there exists custom code even within Qt for sending and handling QEvent::ToolTips in QObjects that are not QWidgets.

QSystemTrayIcon and potential subclasses are examples of QObjects that handle ToolTip events even though they are not QWidgets.

Merge request reports