Send QEvent::Tooltip to QSystemTrayIcon

QSystemTrayIcon's window should send QEvent::ToolTip to QSystemTrayIcon
main class under X11. This patch fixes regression inroduced in Qt 5.0.

Change-Id: I81f6d85e13f492e5e7d13dacc44185a511e5085d
Task-number: QTBUG-46130
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
Ilya Kotov 2015-11-22 13:05:38 +03:00
parent 07fdfa5598
commit acc3df2c4e
2 changed files with 3 additions and 6 deletions

View File

@ -284,12 +284,6 @@ bool QSystemTrayIcon::isVisible() const
*/
bool QSystemTrayIcon::event(QEvent *e)
{
#if defined(Q_DEAD_CODE_FROM_QT4_X11)
if (e->type() == QEvent::ToolTip) {
Q_D(QSystemTrayIcon);
return d->sys->deliverToolTipEvent(e);
}
#endif
return QObject::event(e);
}

View File

@ -194,6 +194,9 @@ void QSystemTrayIconSys::mouseDoubleClickEvent(QMouseEvent *ev)
bool QSystemTrayIconSys::event(QEvent *e)
{
switch (e->type()) {
case QEvent::ToolTip:
QApplication::sendEvent(q, e);
break;
#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel:
return QApplication::sendEvent(q, e);