diff options
author | Jan Arve Saether <jan-arve.saether@theqtcompany.com> | 2015-03-19 13:38:03 +0100 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@theqtcompany.com> | 2015-04-07 09:17:53 +0000 |
commit | 3d30c6d7b40ce86f49bc7bdc5c2c74ce180bb3dd (patch) | |
tree | a684e03d4d23ac657fd1eee06f2598e3aa559bda | |
parent | 9a6b96d4de4124cedf6fb41836fcf299c6613d20 (diff) |
Specifically mark Repeater as transparent for positioners.
Historically, Repeaters were avoided by their parent positioners by only
accepting items with a width *and* height greater than zero. (Repeater is
an item where both width and height defaults to zero).
Later, QQuickItemPrivate::isTransparentForPositioner() were added to
fix similar problems with item.layer and item.layer.effect (change
da15ea0f3b5805db657f13060c21efa78f10cde2)
Since isTransparentForPositioner is now available, we can therefore mark
mark QQuickRepeater also as transparent for positioners.
This also enables Qt Quick Layouts to have a much better heuristic on
which items should be ignored or not.
AFAICS, this will only break if people actually resized their repeaters
(and they thus got included in their parent positioners). I cannot see why
anybody would have wanted this behavior (and depend on it). Therefore,
there is a risk of regression, but I doubt that this is behavior that
people would expect not to break.
[ChangeLog][QtQuick][Repeater] Positioners will now always ignore
Repeaters. Previously, Repeaters were ignored by Positioners when their
width or height were 0.
Change-Id: I1132b753869fdc398eaeabeb9cce7cbf545dbbed
Task-number: Preparation for QTBUG-44077
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
-rw-r--r-- | src/quick/items/qquickrepeater.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp index 0168d73c8f..9cddd9de0d 100644 --- a/src/quick/items/qquickrepeater.cpp +++ b/src/quick/items/qquickrepeater.cpp @@ -50,6 +50,7 @@ QQuickRepeaterPrivate::QQuickRepeaterPrivate() , delegateValidated(false) , itemCount(0) { + setTransparentForPositioner(true); } QQuickRepeaterPrivate::~QQuickRepeaterPrivate() |