qt5base-lts/tests/auto
Eskil Abrahamsen Blomfeldt 720e243d88 Fix crash when detaching dangling QTextCursor
When a QTextCursor survives its QTextDocument, the internal
QTextDocumentPrivate pointer is set to null. There are checks for
this in all the QTextCursor functions to skip out early if such
a QTextCursor is used.

However, when executing the "if (d->priv)" condition in setters,
this will access the non-const operator->() of QSharedDataPointer
and detach the QTextCursorPrivate, and in the copy constructor of
this class, there was an unprotected call into priv->addCursor().

In theory, we could cast all the checks for d->priv to avoid
detaching, but in practice this doesn't matter, since the setters
will typically detach anyway later on.

[ChangeLog][QtGui][Text] Fixed a crash that can happen when calling
a setter on a QTextCursor after its QTextDocument has been deleted.

Task-number: QTBUG-70293
Change-Id: I8f6dc5bb344d1d824f673c0c220b68b7fee237a8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-27 06:51:37 +00:00
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for 5.11 for QtBase 2018-06-05 06:00:28 +00:00
cmake Merge dev into 5.12 2018-08-21 02:32:50 +02:00
concurrent Merge remote-tracking branch 'origin/5.11' into dev 2018-02-16 08:54:58 +01:00
corelib Re-enable thread autotests 2018-09-25 22:35:40 +00:00
dbus Fix wrong relative path to qdbus_symbols.cpp 2018-07-24 04:24:31 +00:00
gui Fix crash when detaching dangling QTextCursor 2018-09-27 06:51:37 +00:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network tst_qdtls: add 'invalidConfiguration' test 2018-08-10 12:18:41 +00:00
opengl Blacklist flaky tst_QGL::graphicsViewClipping on RHEL 7.4 2018-09-13 15:53:20 +00:00
other Extend opensuse blacklistings to opensuse-leap 2018-09-11 12:11:45 +00:00
printsupport Merge remote-tracking branch 'origin/5.11' into dev 2018-05-03 14:50:22 +02:00
shared Remove workaround for potentially unavailable pasteboard in macOS 2017-03-07 01:04:46 +00:00
sql Merge remote-tracking branch 'origin/5.11' into 5.12 2018-09-14 01:00:08 +02:00
testlib Merge remote-tracking branch 'origin/5.11' into dev 2018-07-02 11:23:45 +02:00
tools uic: Fix pixmap functions for QIcon 2018-09-06 11:58:40 +00:00
widgets Blacklist flaky qgraphicsscene autotests 2018-09-24 21:13:39 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h Rework QNetworkReply tests to use docker-based test servers 2018-07-27 17:40:27 +00:00
testserver.pri Postpone testing docker images and files until running 'make check' 2018-08-30 04:06:51 +00:00