summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-04-01 00:36:49 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-04-01 01:23:34 (GMT)
commit1f38d41854fa2daa51d938a4eb398752b1751e0b (patch)
tree0f8cb5b1e7982258098c782c3674c435f39bdd14 /tests/auto
parent1ff7c423308feeaa73e1eab6e20147f5c3d2ccd3 (diff)
downloadQt-1f38d41854fa2daa51d938a4eb398752b1751e0b.zip
Qt-1f38d41854fa2daa51d938a4eb398752b1751e0b.tar.gz
Qt-1f38d41854fa2daa51d938a4eb398752b1751e0b.tar.bz2
Changing width of RTL positioner doesn't relayout
If the width of the layout changes then the items must be laid out again. Change-Id: I2b97bd45d07842fd3da2a0637391473ed6d78aa8 Task-number: QTBUG-18501 Reviewed-by: Michael Brasser
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
index 92ab722..78821cb 100644
--- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
+++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
@@ -154,6 +154,15 @@ void tst_QDeclarativePositioners::test_horizontal_rtl()
QCOMPARE(row->width(), 110.0);
QCOMPARE(row->height(), 50.0);
+ // Change the width of the row and check that items stay to the right
+ row->setWidth(200);
+ QCOMPARE(one->x(), 150.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 130.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 90.0);
+ QCOMPARE(three->y(), 0.0);
+
delete canvas;
}
@@ -527,6 +536,19 @@ void tst_QDeclarativePositioners::test_grid_rightToLeft()
QCOMPARE(grid->width(), 100.0);
QCOMPARE(grid->height(), 100.0);
+ // Change the width of the grid and check that items stay to the right
+ grid->setWidth(200);
+ QCOMPARE(one->x(), 150.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 130.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 100.0);
+ QCOMPARE(three->y(), 0.0);
+ QCOMPARE(four->x(), 150.0);
+ QCOMPARE(four->y(), 50.0);
+ QCOMPARE(five->x(), 140.0);
+ QCOMPARE(five->y(), 50.0);
+
delete canvas;
}