summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAles Erjavec <ales.erjavec@fri.uni-lj.si>2018-04-18 13:05:25 +0200
committerAleš Erjavec <ales.erjavec324@gmail.com>2018-08-17 12:02:38 +0000
commita4a730f4cbe63ef14edce6be0dfb50a34eb08255 (patch)
tree6cb38669cb854bafe33743b7ea90ed4f09dc9885 /src
parentdf91fd119828b75cb5c411e3e8b9e9af64c864e1 (diff)
QComboBox: Start blockMouseReleaseTimer after showPopup call
The layout/size hinting done in showPopup should not count towards the mouse release blocking timeout as it might take more then the double click interval itself, causing the popup to hide immediately on button release. Task-number: QTBUG-67583 Change-Id: I37ac77ac331a4f865a9242581232b85606f883c5 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qcombobox.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 04a44e1f37..e20a0892b4 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -3160,7 +3160,6 @@ void QComboBoxPrivate::showPopupFromMouseEvent(QMouseEvent *e)
#endif
// We've restricted the next couple of lines, because by not calling
// viewContainer(), we avoid creating the QComboBoxPrivateContainer.
- viewContainer()->blockMouseReleaseTimer.start(QApplication::doubleClickInterval());
viewContainer()->initialClickPosition = q->mapToGlobal(e->pos());
#ifdef QT_KEYPAD_NAVIGATION
}
@@ -3169,8 +3168,10 @@ void QComboBoxPrivate::showPopupFromMouseEvent(QMouseEvent *e)
// The code below ensures that regular mousepress and pick item still works
// If it was not called the viewContainer would ignore event since it didn't have
// a mousePressEvent first.
- if (viewContainer())
+ if (viewContainer()) {
+ viewContainer()->blockMouseReleaseTimer.start(QApplication::doubleClickInterval());
viewContainer()->maybeIgnoreMouseButtonRelease = false;
+ }
} else {
#ifdef QT_KEYPAD_NAVIGATION
if (QApplication::keypadNavigationEnabled() && sc == QStyle::SC_ComboBoxEditField && lineEdit) {