Avoid Text layout being triggered unnecessarily
authorMartin Jones <martin.jones@nokia.com>
Wed, 7 Dec 2011 01:20:25 +0000 (11:20 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 7 Dec 2011 06:18:55 +0000 (07:18 +0100)
commit3bb47f45ebf1f2a5dc26067c762f30b15f2308c4
treeb68cb40de89a7999fe7ee35cead36de819568c01
parentd052d2f569324f9a5416ee69ad60d4d4ded84ad3
Avoid Text layout being triggered unnecessarily

Text was quite often layed out twice during construction due to
geometry changes, and often at run time due to other geometry changes.
This change checks for cases which do not require relayouting and
drops out early.  These are easier to detect than trying to have a
single giant if statement covering all the positive combinations.

Change-Id: I2deb2ab52d35b3d02bced698d05fef91c9e2f745
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/quick/items/qquicktext.cpp
tests/auto/qtquick2/qquicktext/tst_qquicktext.cpp