summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Kristensen <msk@nullpointer.dk>2018-09-18 15:23:19 +0200
committerThorbjørn Lund Martsum <tmartsum@gmail.com>2018-09-24 09:57:55 +0000
commitf30bf5fbd58c3fd67a98a1c759b63f24fbab8a41 (patch)
tree6125aaff210d08c03fb5e92d2018ab2633d1f43a
parentb7a123a6eed359c362d35247dbf16e963b2f1d0d (diff)
Fix shortcuts in dock widgets with custom title bar
QWidgetResizeHandler cannot be sure that it will see the MouseReleaseEvent and therefore buttonDown could be set wrong (and is set wrong in QGraphicsViews). When the mouse is up, the widget should not think it is moving or re-sizing the dock widget. A similar fix exists in the code a few lines above. Task-number: QTBUG-70596 Change-Id: I52ce487836bc71da8fd7d71f8a89e21b51406d00 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r--src/widgets/widgets/qwidgetresizehandler.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qwidgetresizehandler.cpp b/src/widgets/widgets/qwidgetresizehandler.cpp
index 45010d1768..7ed6f6d78d 100644
--- a/src/widgets/widgets/qwidgetresizehandler.cpp
+++ b/src/widgets/widgets/qwidgetresizehandler.cpp
@@ -192,6 +192,7 @@ bool QWidgetResizeHandler::eventFilter(QObject *o, QEvent *ee)
keyPressEvent(static_cast<QKeyEvent *>(ee));
break;
case QEvent::ShortcutOverride:
+ buttonDown &= ((QGuiApplication::mouseButtons() & Qt::LeftButton) != Qt::NoButton);
if (buttonDown) {
ee->accept();
return true;