summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2019-08-26 17:59:22 +0300
committerKonstantin Ritt <ritt.ks@gmail.com>2019-09-12 14:35:08 +0300
commita5be4ae50c40f938ca8660296362fc06cc8273b1 (patch)
tree4737ed06a34f3c5140ad6459bed1f64dbe945b3c
parentc18c7bd7f9596e5ad3d13876a91203e1ceba2544 (diff)
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 <mitch.curtis@qt.io>
-rw-r--r--src/quicktemplates2/qquickmenu.cpp2
-rw-r--r--src/quicktemplates2/qquicktooltip.cpp6
2 files changed, 7 insertions, 1 deletions
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)