summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.tests/avx512/avx512.cpp5
-rw-r--r--doc/src/examples/bearermonitor.qdoc35
-rw-r--r--doc/src/examples/customtypesending.qdoc121
-rw-r--r--doc/src/examples/dbus-chat.qdoc36
-rw-r--r--doc/src/examples/digiflip.qdoc31
-rw-r--r--doc/src/examples/flickable.qdoc33
-rw-r--r--doc/src/examples/flightinfo.qdoc33
-rw-r--r--doc/src/examples/htmlinfo.qdoc68
-rw-r--r--doc/src/examples/lightmaps.qdoc33
-rw-r--r--doc/src/examples/raycasting.qdoc33
-rw-r--r--doc/src/examples/rsslisting.qdoc36
-rw-r--r--doc/src/examples/styleexample.qdoc33
-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
16 files changed, 23 insertions, 496 deletions
diff --git a/config.tests/avx512/avx512.cpp b/config.tests/avx512/avx512.cpp
index 29e88ebf15..4d47db8463 100644
--- a/config.tests/avx512/avx512.cpp
+++ b/config.tests/avx512/avx512.cpp
@@ -65,6 +65,10 @@ int main(int, char**argv)
d = _mm512_loadu_pd((double *)argv + 64);
f = _mm512_loadu_ps((float *)argv + 128);
+ // some intrinsic that GCC forgot until GCC 8
+ i = _mm512_maskz_set1_epi32(m, '?');
+ _mm512_mask_cvtepi32_storeu_epi8(argv, m, i);
+
#ifdef WANT_AVX512ER
/* AVX512 Exponential and Reciprocal */
f = _mm512_exp2a23_round_ps(f, 8);
@@ -84,6 +88,7 @@ int main(int, char**argv)
#ifdef WANT_AVX512BW
/* AVX512 Byte and Word support */
i = _mm512_mask_loadu_epi8(i, m, argv - 8);
+ _mm512_mask_cvtepi16_storeu_epi8(argv + 8, m, i);
#endif
#ifdef WANT_AVX512VL
/* AVX512 Vector Length */
diff --git a/doc/src/examples/bearermonitor.qdoc b/doc/src/examples/bearermonitor.qdoc
deleted file mode 100644
index ab68f99a7b..0000000000
--- a/doc/src/examples/bearermonitor.qdoc
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example bearermonitor
- \title Bearer Monitor Example
-
- The Bearer Monitor example shows how to use the Bearer Management API.
-
- \image bearermonitor-example.png Screenshot of the Bearer Monitor example
-*/
diff --git a/doc/src/examples/customtypesending.qdoc b/doc/src/examples/customtypesending.qdoc
deleted file mode 100644
index 9fd64b42fd..0000000000
--- a/doc/src/examples/customtypesending.qdoc
+++ /dev/null
@@ -1,121 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example tools/customtypesending
- \title Custom Type Sending Example
-
- The Custom Type Sending example shows how to use a custom type with signals
- and slots.
-
- \image customtypesending-example.png
-
- \section1 Overview
-
- In the \l{Custom Type Example}, we showed how to integrate custom types
- with the meta-object system, enabling them to be stored in QVariant
- objects, written out in debugging information and used in signal-slot
- communication.
-
- In this example, we demonstrate that the preparations made to the
- \c Message class and its declaration with Q_DECLARE_METATYPE() enable it
- to be used with direct signal-slot connections. We do this by creating
- a \c Window class containing signals and slots whose signatures include
- \c Message arguments.
-
- \section1 The Window and Message Class Definitions
-
- We define a simple \c Window class with a signal and public slot that
- allow a \c Message object to be sent via a signal-slot connection:
-
- \snippet examples/tools/customtypesending/window.h Window class definition
-
- The window will contain a text editor to show the contents of a message
- and a push button that the user can click to send a message. To facilitate
- this, we also define the \c sendMessage() slot. We also keep a \c Message
- instance in the \c thisMessage private variable which holds the actual
- message to be sent.
-
- The \c Message class is defined in the following way:
-
- \snippet examples/tools/customtypesending/message.h custom type definition
-
- The type is declared to the meta-type system with the Q_DECLARE_METATYPE()
- macro:
-
- \snippet examples/tools/customtypesending/message.h custom type meta-type declaration
-
- This will make the type available for use in direct signal-slot connections.
-
- \section1 The Window Class Implementation
-
- The \c Window constructor sets up a user interface containing a text
- editor and a push button.
-
- \snippet examples/tools/customtypesending/window.cpp Window constructor
-
- The button's \l{QPushButton::}{clicked()} signal is connected to the
- window's \c{sendMessage()} slot, which emits the \c{messageSent(Message)}
- signal with the \c Message held by the \c thisMessage variable:
-
- \snippet examples/tools/customtypesending/window.cpp sending a message
-
- We implement a slot to allow the message to be received, and this also
- lets us set the message in the window programatically:
-
- \snippet examples/tools/customtypesending/window.cpp receiving a message
-
- In this function, we simply assign the new message to \c thisMessage
- and update the text in the editor.
-
- \section1 Making the Connection
-
- In the example's \c{main()} function, we perform the connection between
- two instances of the \c Window class:
-
- \snippet examples/tools/customtypesending/main.cpp main function
-
- We set the message for the first window and connect the
- \c{messageSent(Message)} signal from each window to the other's
- \c{setMessage(Message)} slot. Since the signals and slots mechanism is only
- concerned with the type, we can simplify the signatures of both the
- signal and slot when we make the connection.
-
- When the user clicks on the \uicontrol{Send message} button in either window,
- the message shown will be emitted in a signal that the other window will
- receive and display.
-
- \section1 Further Reading
-
- Although the custom \c Message type can be used with direct signals and
- slots, an additional registration step needs to be performed if you want
- to use it with queued signal-slot connections. See the
- \l{Queued Custom Type Example} for details.
-
- More information on using custom types with Qt can be found in the
- \l{Creating Custom Qt Types} document.
-*/
diff --git a/doc/src/examples/dbus-chat.qdoc b/doc/src/examples/dbus-chat.qdoc
deleted file mode 100644
index 703d4eef50..0000000000
--- a/doc/src/examples/dbus-chat.qdoc
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example dbus/dbus-chat
- \title D-Bus Chat Example
-
- The D-Bus Chat example shows how to use D-Bus to communicate between two
- applications.
-
- \image dbus-chat-example.png
-*/
diff --git a/doc/src/examples/digiflip.qdoc b/doc/src/examples/digiflip.qdoc
deleted file mode 100644
index 174b807a05..0000000000
--- a/doc/src/examples/digiflip.qdoc
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example embedded/digiflip
- \title Digiflip
-*/
diff --git a/doc/src/examples/flickable.qdoc b/doc/src/examples/flickable.qdoc
deleted file mode 100644
index f289f421c3..0000000000
--- a/doc/src/examples/flickable.qdoc
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example embedded/flickable
- \title Flickable List
-
- \image flickable-demo.png
-*/
diff --git a/doc/src/examples/flightinfo.qdoc b/doc/src/examples/flightinfo.qdoc
deleted file mode 100644
index 7e5162eb0e..0000000000
--- a/doc/src/examples/flightinfo.qdoc
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example embedded/flightinfo
- \title Flight Info
-
- \image flightinfo-demo.png
-*/
diff --git a/doc/src/examples/htmlinfo.qdoc b/doc/src/examples/htmlinfo.qdoc
deleted file mode 100644
index 8397a28715..0000000000
--- a/doc/src/examples/htmlinfo.qdoc
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example xml/htmlinfo
- \title XML HTML Info Example
-
- The XML HTML Info example provides a simple command line utility that
- scans the current directory for HTML files and prints statistics about
- them to standard out.
-
- The files are parsed using a QXmlStreamReader object. If the file does
- not contain a well-formed XML document, a description of the error is
- printed to the standard error console.
-
- \section1 Basic Operation
-
- The main function of the example uses QDir to access files in the current
- directory that match either "*.htm" or "*.html". For each file found,
- the \c parseHtmlFile() function is called.
-
- Reading XML is handled by an instance of the QXmlStreamReader class, which
- operates on the input file object:
-
- \snippet examples/xml/htmlinfo/main.cpp 0
-
- The work of parsing and the XML and extracting statistics is done in a
- while loop, and is driven by input from the reader:
-
- \snippet examples/xml/htmlinfo/main.cpp 1
-
- If more input is available, the next token from the input file is read
- and parsed. The program then looks for the specific element types,
- "title", "a", and "p", and stores information about them.
-
- When there is no more input, the loop terminates. If an error occurred,
- information is written to the standard out file via a stream, and the
- example exits:
-
- \snippet examples/xml/htmlinfo/main.cpp 2
-
- If no error occurred, the example prints some statistics from the data
- gathered in the loop, and then exits.
-*/
diff --git a/doc/src/examples/lightmaps.qdoc b/doc/src/examples/lightmaps.qdoc
deleted file mode 100644
index c9f1fd664f..0000000000
--- a/doc/src/examples/lightmaps.qdoc
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example embedded/lightmaps
- \title Light Maps
-
- \image lightmaps-demo.png
-*/
diff --git a/doc/src/examples/raycasting.qdoc b/doc/src/examples/raycasting.qdoc
deleted file mode 100644
index 16c1b7a754..0000000000
--- a/doc/src/examples/raycasting.qdoc
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example embedded/raycasting
- \title Ray Casting
-
- \image raycasting-demo.png
-*/
diff --git a/doc/src/examples/rsslisting.qdoc b/doc/src/examples/rsslisting.qdoc
deleted file mode 100644
index 6ca22ce5b5..0000000000
--- a/doc/src/examples/rsslisting.qdoc
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example xml/rsslisting
- \title RSS-Listing Example
-
- The RSS-Listing example shows how to create a widget that displays news items
- from RDF news sources.
-
- \image rsslistingexample.png
-*/
diff --git a/doc/src/examples/styleexample.qdoc b/doc/src/examples/styleexample.qdoc
deleted file mode 100644
index 6294800cef..0000000000
--- a/doc/src/examples/styleexample.qdoc
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \example embedded/styleexample
- \title Embedded Styles
-
- \image styledemo-demo.png
-*/
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;