summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-25 01:00:35 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-25 01:00:35 +0200
commit35ec3b49e1b0e7c72643a4e5b835bff57762f8cb (patch)
tree97bc6a16cca64905434647f810635cb143ad9aac /src
parent8bd0e6709f733a4934f32b4bd455eb1a46ff02d6 (diff)
parent2e94947c5602800b540fdabbb9c058a63f13e9d0 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qabstracteventdispatcher.cpp9
-rw-r--r--src/plugins/platforms/cocoa/qnsview_keys.mm2
-rw-r--r--src/plugins/platforms/cocoa/qnsview_mouse.mm10
-rw-r--r--src/widgets/widgets/qwidgetresizehandler.cpp1
4 files changed, 18 insertions, 4 deletions
diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
index 304a7bda08..655fe58f98 100644
--- a/src/corelib/kernel/qabstracteventdispatcher.cpp
+++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
@@ -309,6 +309,15 @@ int QAbstractEventDispatcher::registerTimer(int interval, Qt::TimerType timerTyp
Wakes up the event loop.
+ \omit
+ ### FIXME - QTBUG-70229
+ On Unix and Glib event dispatchers, if the dispatcher is already awake when
+ this function is called, it is ensured that the current iteration won't block
+ waiting for more events, but will instead do another event loop iteration.
+
+ ### TODO - does other event dispatchers behave the same?
+ \endomit
+
\sa awake()
*/
diff --git a/src/plugins/platforms/cocoa/qnsview_keys.mm b/src/plugins/platforms/cocoa/qnsview_keys.mm
index 85c0607265..28db532ddc 100644
--- a/src/plugins/platforms/cocoa/qnsview_keys.mm
+++ b/src/plugins/platforms/cocoa/qnsview_keys.mm
@@ -47,7 +47,7 @@
Qt::KeyboardModifiers qtMods =Qt::NoModifier;
if (modifierFlags & NSEventModifierFlagShift)
qtMods |= Qt::ShiftModifier;
- if (modifierFlags & NSEventModifierFlagShift)
+ if (modifierFlags & NSEventModifierFlagControl)
qtMods |= dontSwapCtrlAndMeta ? Qt::ControlModifier : Qt::MetaModifier;
if (modifierFlags & NSEventModifierFlagOption)
qtMods |= Qt::AltModifier;
diff --git a/src/plugins/platforms/cocoa/qnsview_mouse.mm b/src/plugins/platforms/cocoa/qnsview_mouse.mm
index 468f26ffb4..3d6471005d 100644
--- a/src/plugins/platforms/cocoa/qnsview_mouse.mm
+++ b/src/plugins/platforms/cocoa/qnsview_mouse.mm
@@ -198,7 +198,9 @@
const auto modifiers = [QNSView convertKeyModifiers:theEvent.modifierFlags];
const auto buttons = currentlyPressedMouseButtons();
- const auto button = cocoaButton2QtButton(theEvent);
+ auto button = cocoaButton2QtButton(theEvent);
+ if (button == Qt::LeftButton && m_sendUpAsRightButton)
+ button = Qt::RightButton;
const auto eventType = cocoaEvent2QtMouseEvent(theEvent);
QWindowSystemInterface::handleMouseEvent(targetView->m_platformWindow->window(),
@@ -266,12 +268,14 @@
if (m_sendUpAsRightButton && button == Qt::LeftButton)
button = Qt::RightButton;
- if (button == Qt::RightButton)
- m_sendUpAsRightButton = false;
m_buttons &= ~button;
[self handleMouseEvent:theEvent];
+
+ if (button == Qt::RightButton)
+ m_sendUpAsRightButton = false;
+
return true;
}
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;