qt5base-lts/tests/auto
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
..
android Enabling CI usage for runtests_androiddeployqt.pl 2013-10-20 09:37:33 +02:00
bic/data test: Add 5.1.0 bic data for linux-gcc-ia32 2013-07-08 21:47:36 +02:00
cmake Teach CMake about Qt 5 plugins. 2013-09-10 14:38:18 +02:00
compilerwarnings/data Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
concurrent QtConcurrent tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:25 +01:00
corelib WinRT: implement QStandardPaths 2013-11-12 12:46:37 +01:00
dbus don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
gui Introduce QTextDocument::baseUrl 2013-10-25 14:18:05 +02:00
guiapplauncher Update the documentation after moving examples. 2011-07-05 21:19:08 +02:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network Merge remote-tracking branch 'origin/stable' into dev 2013-10-24 12:48:42 +02:00
opengl Fixed tst_qgl for fullscreen platforms 2013-08-07 09:01:36 +02:00
other don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
printsupport QPrintSupport: Move QAbstractPrintDialog test into QPrintSupport 2013-10-26 00:39:51 +02:00
shared Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
sql Fix a bug in QSqlQuery::isNull documentation 2013-10-22 17:05:47 +02:00
testlib Add overload of QTest::ignoreMessage() taking a QRegularExpression. 2013-11-17 19:10:22 +01:00
tools uic: Accept an -include argument to generate a #include. 2013-11-11 15:56:52 +01:00
widgets remove finishEdit() call, fix double textChanged on delete 2013-11-21 18:30:05 +01:00
xml Add explanation to QEXPECT_FAIL statements 2013-10-17 09:50:58 +02:00
auto.pro exclude gui-needing tests from -no-gui build 2013-10-18 20:05:27 +02:00
network-settings.h network test settings: support newer FTP server versions 2013-08-28 12:45:34 +02:00
qtest-config.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
test.pl Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00