Reduce the number of unnecessary layouts on geometry changes.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Thu, 7 Jun 2012 05:56:16 +0000 (15:56 +1000)
committerQt by Nokia <qt-info@nokia.com>
Sun, 8 Jul 2012 23:34:54 +0000 (01:34 +0200)
commit3095493a4ce4bec11b9381a3d1d23f17b313332c
tree2869549eec623e38d8915c58592a235671f7a387
parentd65b660d5d7f30058efc74c7cab074641923038f
Reduce the number of unnecessary layouts on geometry changes.

Improve checks for geometry changes that don't affect layout, i.e
width increasing when the previous layout didn't wrap or elide.

Set implicit sizes just once during layout rather than setting the
implicit width during and the implicit height after to limit the when
an implicit size change can change geometry.

And if there are multiple layouts of the same text/font combination
re-use cached layout data as much as possible by guarding against
unnecessary property changes on the layout, and not creating a new
layout for calculating the implicit size of truncated text.

Change-Id: Ia05e52e9170e1f5d3364896ab119e00d8a318299
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/quick/items/qquicktext.cpp
src/quick/items/qquicktext_p_p.h
src/quick/items/qquicktextutil.cpp
src/quick/items/qquicktextutil_p.h
tests/auto/quick/qquicktext/tst_qquicktext.cpp