diff options
author | Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> | 2009-09-25 21:53:15 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-06 09:29:02 (GMT) |
commit | 0d1e86fdfb7958a1affb93c7760c22fca9a0fcb2 (patch) | |
tree | a3f9333202fddba655742bfe6db4d413cd7979f3 /tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp | |
parent | 89ea5d0cc0b00a1d4e8f3e700b86f168cf4437ed (diff) | |
download | Qt-0d1e86fdfb7958a1affb93c7760c22fca9a0fcb2.zip Qt-0d1e86fdfb7958a1affb93c7760c22fca9a0fcb2.tar.gz Qt-0d1e86fdfb7958a1affb93c7760c22fca9a0fcb2.tar.bz2 |
QGraphicsAnchorLayout: Adding a Float Conflict test case
Now we don't support floating items and so we should consider
that the layout has a conflict when handling this situation.
Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Diffstat (limited to 'tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp')
-rw-r--r-- | tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index a521b78..caf078e 100644 --- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -530,16 +530,18 @@ void tst_QGraphicsAnchorLayout1::testIsValid() TestWidget *widget1 = new TestWidget(); TestWidget *widget2 = new TestWidget(); + // Vertically the layout has floating items. Therefore, we have a conflict layout->setAnchor(layout, Qt::AnchorLeft, widget1, Qt::AnchorLeft, 0.1); layout->setAnchor(layout, Qt::AnchorRight, widget1, Qt::AnchorRight, -0.1); + // Horizontally the layout has floating items. Therefore, we have a conflict layout->setAnchor(layout, Qt::AnchorTop, widget2, Qt::AnchorTop, 0.1); layout->setAnchor(layout, Qt::AnchorBottom, widget2, Qt::AnchorBottom, -0.1); widget->setLayout(layout); widget->setGeometry(QRectF(0,0,100,100)); - QCOMPARE(layout->isValid(), true); + QCOMPARE(layout->isValid(), false); delete widget; } } |