Go to file
Tor Arne Vestbø 7bd243b3fb macOS: Don't read keyCode of non-key events when inserting newlines
When the system input method decides to trigger an insertNewline
message it might come from a synthetic NSEvent of type AppKitDefined,
which does not respond to the keyCode message. Accessing the keyCode
would result in an exception being thrown.

We guard for this scenario by moving the keyCode access into the
key-press and -release specific parts of the KeyEvent constructor,
making the KeyEvent usable with generic NSEvents (even if that
means it will only pull out the timestamp and modifiers).

We also prefer to use the currently interpreted NSEvent, if one is
available, when preparing the synthetic newline event. This ensures
that we get a valid timestamp and modifiers, since the synthetic
AppKitDefined event that the system IM generates does not provide
valid values for these.

Fixes: QTBUG-99186
Pick-to: 6.2 6.3
Change-Id: I050ae2aa2d8ded1be3541f746e6c052f3546e27c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-12-22 01:34:56 +01:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Provide a qtpaths wrapper script when cross-building Qt 2021-11-08 13:41:03 +01:00
cmake CMake: Remove WinRT leftovers from build system 2021-12-18 08:01:39 +08:00
coin coin: Fix sccache to be used when cross-compiling tests 2021-12-16 19:44:13 +01:00
config.tests wasm: add simd support 2021-10-05 11:30:06 +10:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Drop Qt4 support 2021-12-07 01:56:17 +03:00
examples bindablesubscription: Remove duplicated file entry 2021-12-19 14:38:27 +01:00
lib
libexec Fix various configure time warnings about missing QT_BEGIN_NAMESPACE 2021-11-01 17:17:29 +02:00
mkspecs wasm: remove deprecated argument for source maps 2021-12-13 06:53:22 +00:00
qmake qmake/Xcode: Mark "Qt Preprocess" build phase as always out of date 2021-12-09 17:28:35 +01:00
src macOS: Don't read keyCode of non-key events when inserting newlines 2021-12-22 01:34:56 +01:00
tests Stabilize tst_QGraphicsProxyWidget::scrollUpdate 2021-12-22 01:34:56 +01:00
util QLocale: Extend support for language codes 2021-12-09 03:45:08 +01:00
.cmake.conf Revert "CMake: Warn if cmake_minimum_required has an unsupported low version" 2021-10-04 15:55:10 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt Add _make_aab target 2021-11-30 20:16:13 +01:00
conanfile.py use short_path attribute 2021-12-07 14:19:38 +00:00
config_help.txt Document that schannel is on by default 2021-10-06 15:05:20 +02:00
configure Remove unsupported, host-related options from configure shell script 2021-08-05 02:44:27 +02:00
configure.bat Fix our usage of CMake script mode in Windows configure 2021-08-20 19:44:43 +02:00
configure.cmake Support configure -platform linux-clang-libc++ 2021-12-14 20:04:43 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
LICENSE.FDL Remove trailing whitespace in LICENSE.FDL 2021-11-26 18:28:49 +01:00
LICENSE.GPL2
LICENSE.GPL3
LICENSE.GPL3-EXCEPT
LICENSE.LGPL3
LICENSE.QT-LICENSE-AGREEMENT Update latest qt license agreement 2021-12-02 14:16:49 +00:00
qt_cmdline.cmake configure: Remove vestiges of handling QMAKE_* variable assignments 2021-11-24 10:47:10 +01:00
sync.profile Implement generating of a module cpp export header 2021-06-24 20:40:49 +02:00