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::ToolTip
s are only ever sent
to QWidget
s. While the documentation implies that, there exists
custom code even within Qt for sending and handling
QEvent::ToolTips
in QObject
s that are not QWidget
s.
QSystemTrayIcon
and potential subclasses are examples of QObject
s
that handle ToolTip events even though they are not QWidget
s.