Speed up QTextEngine::resolveAdditionalFormats
authorOlivier Goffart <ogoffart@woboq.com>
Thu, 19 Jul 2012 12:54:10 +0000 (14:54 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 31 Aug 2012 20:21:28 +0000 (22:21 +0200)
commit49fbb6e14af78f751fa114c3cf986aaa607d7408
tree09b0adfee85ef0f072e78eb393ea2a82378853c9
parent5fd483d0511864a4099c3f0786a708f4e992979e
Speed up QTextEngine::resolveAdditionalFormats

Don't call the linear QTextEngine::format in the loop.
Instead, keep track of the current formats by indexing their start and end position.

Task-number: QTBUG-8389
Change-Id: I89c18b804111edfab6254442cbee33da39d1a273
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
(cherry picked from commit 4f6efe16416f0222ae78ab16c0eb8085bf9c521b)
src/gui/text/qtextengine.cpp