aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpositioners
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-01-21 23:40:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-25 18:26:27 +0100
commitafb5bf71c942d411d6102ce637bc7499d8ae467c (patch)
tree50abc97628feb209b52e191091d310fc3e164bdc /tests/auto/quick/qquickpositioners
parent97a6e62cb5947ea5731814c0d7183028668dfd03 (diff)
Positioners: fix layout mirroring
Listen to positioner geometry changes when the _effective_ layout direction is RTL. Task-number: QTBUG-35095 Change-Id: If06955c6bb04e5bed2126b05489229278c192173 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'tests/auto/quick/qquickpositioners')
-rw-r--r--tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
index 69008486c4..e63ff6639e 100644
--- a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
+++ b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
@@ -1968,6 +1968,14 @@ void tst_qquickpositioners::test_mirroring()
QQuickItem *itemA = rootA->findChild<QQuickItem*>(objectName);
QQuickItem *itemB = rootB->findChild<QQuickItem*>(objectName);
QTRY_COMPARE(itemA->x(), itemB->x());
+
+ // after resize (QTBUG-35095)
+ QQuickItem *positionerA = itemA->parentItem();
+ QQuickItem *positionerB = itemB->parentItem();
+ positionerA->setWidth(positionerA->width() * 2);
+ positionerB->setWidth(positionerB->width() * 2);
+ QTRY_VERIFY(!QQuickItemPrivate::get(positionerA)->polishScheduled && !QQuickItemPrivate::get(positionerB)->polishScheduled);
+ QTRY_COMPARE(itemA->x(), itemB->x());
}
rootA->setProperty("testRightToLeft", false); // layoutDirection: Qt.LeftToRight