Go to file
Eskil Abrahamsen Blomfeldt bc71946487 Don't position cursor inside complex graphemes when clicking outside line
If you clicked to the right of a text line ended with a grapheme consisting of
several characters, either because it was a unicode surrogate pair or a ligature,
we would always to the previous character in logical order, without checking
if this was a valid cursor position.

One result of this would be that hitting backspace when the cursor was positioned
in an invalid position, would cause the entire contents of the document to
become invalid.

Instead we should search backwards for the previous grapheme boundary using
QTextEngine::previousLogicalPosition().

[ChangeLog][QtGui][Text] Fixed position of text cursor set by clicking outside
the bounds of a text line that ends with a surrogate pair or ligature.

Task-number: QTBUG-69085
Change-Id: I7224c065f332f398bdfbb3f42b2b3ec8280c76a4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-06-28 05:20:14 +00:00
bin Merge remote-tracking branch 'origin/5.11.0' into 5.11 2018-05-09 13:48:42 +02:00
config.tests SIMD: Remove unused (and unlikely to be ever used) AVX-512 profiles 2018-06-25 18:49:33 +00:00
dist Add changes file for Qt 5.11.0 2018-04-30 11:54:51 +00:00
doc Doc: Use index.html as the home page reference 2018-06-05 15:48:46 +00:00
examples Add a secure UDP client example 2018-06-22 13:09:42 +00:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs SIMD: Remove unused (and unlikely to be ever used) AVX-512 profiles 2018-06-25 18:49:33 +00:00
qmake qmake: make access to raw data temporaries safe 2018-06-27 17:24:09 +00:00
src Don't position cursor inside complex graphemes when clicking outside line 2018-06-28 05:20:14 +00:00
tests QTableView: update editor geometries directly after scrollbars are adjusted 2018-06-28 04:23:46 +00:00
util Harden logic for converting from CSS gradients to QGradient 2018-06-27 15:40:03 +00:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore gitignore: don't ignore Info.plist templates for libraries 2017-11-23 07:07:48 +00:00
.qmake.conf Bump version 2018-06-01 10:37:15 +00:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
config_help.txt Make the use of -fdata-sections and --gc-sections more generic in Qt 2018-04-27 06:47:35 +00:00
configure configure: Detect Cocoa instead of Carbon 2018-04-05 21:04:22 +00:00
configure.bat configure: Prefer cl.exe over clang-cl.exe 2018-01-04 21:22:42 +00:00
configure.json configure: change convention of passing libraries to config tests 2018-05-08 18:17:29 +00:00
configure.pri configure: centralize shell-quoting of tests' .literal_args field 2018-05-08 12:50:04 +00:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00:00
INSTALL Doc: Update links in INSTALL file 2015-02-16 09:06:41 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.PREVIEW.COMMERCIAL Add new license header templates and license files 2016-01-14 20:43:46 +00:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile Testlib: Rename qtest_global.h to qttestglobal.h 2018-03-21 10:31:01 +00:00