TextEdit: Better support of QTextTable and inline images
authorPierre Rossi <pierre.rossi@digia.com>
Mon, 25 Mar 2013 18:58:46 +0000 (19:58 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 30 Apr 2013 08:13:43 +0000 (10:13 +0200)
commitdfdc4ce825e814b30449cfa1c85d3d2f47f8a845
tree50ee811dece571afe98484e3c2661bd0f97bfead
parenta7cb4acd5077539f78afb7fd53a6ff4231b3d63f
TextEdit: Better support of QTextTable and inline images

Fix some issues with incremental updates found while
playing with the Quick Controls textedit demo.

 -Grouping text blocks into a single text node is fine as
long as it doesn't cross the boundary of a child frame
(e.g. a table), otherwise all that node logic collapses.

 -Text tables are hard to split in a sensible way, ensure
we treat them as one text node for the sake of simplicity.

 -Inline images can cause several text nodes to have the
same apparent start position. Beef up the rewinding logic
in markDirtyNodesForRange.

Change-Id: Ib4518bcd9303035fa00d9f4b16da7ca6c88e2313
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
src/quick/items/qquicktextedit.cpp
src/quick/items/qquicktextedit_p_p.h
src/quick/items/qquicktextnode_p.h