Commit acc3df2c authored by Ilya Kotov's avatar Ilya Kotov
Browse files

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: default avatarBłażej Szczygieł <spaz16@wp.pl>
Reviewed-by: default avatarLaszlo Agocs <laszlo.agocs@theqtcompany.com>
Showing with 3 additions and 6 deletions
...@@ -284,12 +284,6 @@ bool QSystemTrayIcon::isVisible() const ...@@ -284,12 +284,6 @@ bool QSystemTrayIcon::isVisible() const
*/ */
bool QSystemTrayIcon::event(QEvent *e) 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); return QObject::event(e);
} }
......
...@@ -194,6 +194,9 @@ void QSystemTrayIconSys::mouseDoubleClickEvent(QMouseEvent *ev) ...@@ -194,6 +194,9 @@ void QSystemTrayIconSys::mouseDoubleClickEvent(QMouseEvent *ev)
bool QSystemTrayIconSys::event(QEvent *e) bool QSystemTrayIconSys::event(QEvent *e)
{ {
switch (e->type()) { switch (e->type()) {
case QEvent::ToolTip:
QApplication::sendEvent(q, e);
break;
#ifndef QT_NO_WHEELEVENT #ifndef QT_NO_WHEELEVENT
case QEvent::Wheel: case QEvent::Wheel:
return QApplication::sendEvent(q, e); return QApplication::sendEvent(q, e);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment