From a5be4ae50c40f938ca8660296362fc06cc8273b1 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 26 Aug 2019 17:59:22 +0300 Subject: Fix timer events handling if the timer event's timerId isn't recognized, make sure control passes to the base class Change-Id: If5988dbf4ccda6a9887805961b439f93640f71ea Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickmenu.cpp | 2 ++ src/quicktemplates2/qquicktooltip.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/quicktemplates2/qquickmenu.cpp b/src/quicktemplates2/qquickmenu.cpp index 82cc063f..67e2d806 100644 --- a/src/quicktemplates2/qquickmenu.cpp +++ b/src/quicktemplates2/qquickmenu.cpp @@ -1487,7 +1487,9 @@ void QQuickMenu::timerEvent(QTimerEvent *event) if (QQuickMenu *subMenu = d->currentSubMenu()) subMenu->open(); d->stopHoverTimer(); + return; } + QQuickPopup::timerEvent(event); } QFont QQuickMenu::defaultFont() const diff --git a/src/quicktemplates2/qquicktooltip.cpp b/src/quicktemplates2/qquicktooltip.cpp index ddf434a2..c1271dab 100644 --- a/src/quicktemplates2/qquicktooltip.cpp +++ b/src/quicktemplates2/qquicktooltip.cpp @@ -327,10 +327,14 @@ void QQuickToolTip::timerEvent(QTimerEvent *event) if (event->timerId() == d->timeoutTimer.timerId()) { d->stopTimeout(); QQuickPopup::setVisible(false); - } else if (event->timerId() == d->delayTimer.timerId()) { + return; + } + if (event->timerId() == d->delayTimer.timerId()) { d->stopDelay(); QQuickPopup::setVisible(true); + return; } + QQuickPopup::timerEvent(event); } #if QT_CONFIG(accessibility) -- cgit v1.2.3