Go to file
Graham Coleman 92b2275c3d remove finishEdit() call, fix double textChanged on delete
There is a known bug where duplicate textChanged signals are
triggered on backspace/delete. The bug has been seen on Windows,
Mac, and Linux. Gabi showed that this duplicate signal is caused by
two calls to finishEdit(), one direct and one nested,
in QTextCursorPrivate::remove().

To attempt a fix, I removed the direct call and do not change the
nested call. This change only affects text buffers when they
receive remove commands.

This seems to fix the problem, shown by the test project
uploaded to the bug tracker and also in countTextChangedOnRemove
in tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp.

Further analysis of finishEdit() and QTextCursorPrivate::remove():
finishEdit() calls signals contentsChanged() as long as a valid block
is being edited. Remove() calls finishEdit for all non-table edits,
so finishEdit will be called for most cases.

Methods in the public QTextCursor all seem to set adjusted_anchor
and anchor, none reading it directly, so I haven't found publicly
observable consequences to "adjusted_anchor = anchor = position;".

Task-number: QTBUG-15003
Change-Id: Ic35f25ee81c4007867b47cd8be03c146a673f86d
Reviewed-by: Graham Coleman <ravelite@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-21 18:30:05 +01:00
bin Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-15 22:39:25 +02:00
config.tests Add configuration for building with imf support on QNX 2013-10-25 20:17:40 +02:00
dist Add swapInterval to QSurfaceFormat 2013-11-13 09:47:34 +01:00
doc Doc: Remove Plug & Paint plugins from the list of examples 2013-10-09 11:01:35 +02:00
examples Examples: Add support for custom nameserver to dnslookup 2013-11-07 09:44:44 +01:00
lib
mkspecs Make console a no-op for WinRT 2013-11-14 18:53:48 +01:00
qmake qmake: add the store library path on WinRT 2013-11-18 11:00:33 +01:00
src remove finishEdit() call, fix double textChanged on delete 2013-11-21 18:30:05 +01:00
tests remove finishEdit() call, fix double textChanged on delete 2013-11-21 18:30:05 +01:00
tools Make console a no-op for WinRT 2013-11-14 18:53:48 +01:00
util QTimeZone - Define new class and api 2013-09-22 22:21:15 +02:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore Long live QCommandLineParser! 2013-08-24 21:33:39 +02:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Add configuration for building with imf support on QNX 2013-10-25 20:17:40 +02:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL INSTALL: Fix URL of Installing Qt documentation 2013-04-11 16:09:07 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro Merge remote-tracking branch 'origin/stable' into dev 2013-06-27 13:06:38 +02:00
sync.profile put ANGLE includes in a QtANGLE subdir 2013-06-10 21:12:13 +02:00