Layouts implicit sizes was not propagated up properly.
When a layout did not have an implicit size nor any of the
Layout.preferred* properties set, the size hint calculation would
fall back to retrieving the width and the height properties of the
item. It would then store that value in the Layout.preferred*
property. This was wrong.
This could be a problem when an item was later added to the layout,
and consequently the implicit size of the layout got updated.
However, since the layout now had a preferred size set, a parent
layout would ignore the implicit size it had since it would settle
with the Layout.preferred* property (that's the rules the
effectiveSizeHint_helper work with).
The fix is to set the implicit width/height instead of the
Layout.preferred{width|height} property.
The compare in the test was actually by accident wrong, which can be
easily verified.
Change-Id: Ib9110dec7988a547441748698348227d1b8a077f
Reviewed-by:
Richard Moe Gustavsen <richard.gustavsen@digia.com>
Showing
Please register or sign in to comment