Optimize QQuickTextEdit for larger documents.
authorPierre Rossi <pierre.rossi@digia.com>
Mon, 18 Mar 2013 15:25:59 +0000 (16:25 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 20 Mar 2013 07:31:56 +0000 (08:31 +0100)
commitf513e88403b66c4a5efe4c62c160dfce151efb33
treef091c015be4781a9d65bb702c4263cd09cd6adb0
parent471645f6dba6a21b85cb6788f0a0a07b6d5a804a
Optimize QQuickTextEdit for larger documents.

The rationale is to not end up re-processing the whole document on each update
Since we know where the editing takes place, we can break down the text edit's
contents in several text nodes and only re-create the affected text nodes upon
editing.

This requires ripping out the SelectionEngine helper class from QQuickTextNode
so that QQuickTextEdit can tap into its functionality directly.

A positive side-effect of this exercise is that it should be much harder to
to come across GlyphNodes packing more than 16300 glyphs or so.

Task-number: QTBUG-29596
Change-Id: Id29b0709baa43f5b29c44ab02398ba996be3e28a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
src/quick/items/items.pri
src/quick/items/qquicktextcontrol.cpp
src/quick/items/qquicktextcontrol_p.h
src/quick/items/qquicktextcontrol_p_p.h
src/quick/items/qquicktextedit.cpp
src/quick/items/qquicktextedit_p.h
src/quick/items/qquicktextedit_p_p.h
src/quick/items/qquicktextnode.cpp
src/quick/items/qquicktextnode_p.h
src/quick/items/qquicktextnodeengine.cpp [new file with mode: 0644]
src/quick/items/qquicktextnodeengine_p.h [new file with mode: 0644]