Fix alignment of Text element with implicit size
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Thu, 24 Jan 2013 09:28:19 +0000 (10:28 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 24 Jan 2013 13:14:49 +0000 (14:14 +0100)
commitdde265294fb8c48f9e0dce95d2287482ef0c0c6b
treeb125366e921b2fb22a44a804e4384313aef8f98b
parentc5fb0a9d8a7eedaed0c4ecfe354219a9d252062f
Fix alignment of Text element with implicit size

In change e1d6b323d474acc5cd70fd9a0b283326316f55a0 there's an
optimization which disables layouts on the QTextDocument, but the
layout has to be re-enabled before we can call idealWidth() since
this will be zero as long as the page size is 0x0. We simply set
the page size to undefined again before calling idealWidth.

Task-number: QTBUG-29262
Change-Id: I6bebe7be4c99fce0de8fc4178b5e1abc81abbe87
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: aavit <eirik.aavitsland@digia.com>
src/quick/items/qquicktext.cpp
tests/manual/scenegraph_lancelot/data/text/text_html_center_tag.qml [new file with mode: 0644]