summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-07 09:30:30 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-07 09:30:30 (GMT)
commitdde11ce47c2d83bae685f3ff032ee9e6e372058f (patch)
tree6e1d056b5262f5e513b82e9b4e5580d7c7b507e2
parentd6d0b2ef5223b4a40e8907104eb1d9e827507a42 (diff)
downloadQt-dde11ce47c2d83bae685f3ff032ee9e6e372058f.zip
Qt-dde11ce47c2d83bae685f3ff032ee9e6e372058f.tar.gz
Qt-dde11ce47c2d83bae685f3ff032ee9e6e372058f.tar.bz2
Make some lines in the autotest more readable.
-rw-r--r--tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index b076631..286ea2d 100644
--- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -161,15 +161,13 @@ void tst_QGraphicsAnchorLayout::simple()
l->setContentsMargins(0, 0, 0, 0);
// Horizontal
- l->addAnchor(w1, Qt::AnchorLeft, l, Qt::AnchorLeft);
+ l->addAnchor(l, Qt::AnchorLeft, w1, Qt::AnchorLeft);
l->addAnchor(w1, Qt::AnchorRight, w2, Qt::AnchorLeft);
l->addAnchor(w2, Qt::AnchorRight, l, Qt::AnchorRight);
// Vertical
- l->addAnchor(w1, Qt::AnchorTop, l, Qt::AnchorTop);
- l->addAnchor(w2, Qt::AnchorTop, l, Qt::AnchorTop);
- l->addAnchor(w1, Qt::AnchorBottom, l, Qt::AnchorBottom);
- l->addAnchor(w2, Qt::AnchorBottom, l, Qt::AnchorBottom);
+ l->addAnchors(l, w1, Qt::Vertical);
+ l->addAnchors(l, w2, Qt::Vertical);
QGraphicsWidget p;
p.setLayout(l);
@@ -1172,12 +1170,9 @@ void tst_QGraphicsAnchorLayout::delete_anchor()
l->addAnchor(w3, Qt::AnchorRight, l, Qt::AnchorRight);
// Vertical
- l->addAnchor(w1, Qt::AnchorTop, l, Qt::AnchorTop);
- l->addAnchor(w1, Qt::AnchorBottom, l, Qt::AnchorBottom);
- l->addAnchor(w2, Qt::AnchorTop, l, Qt::AnchorTop);
- l->addAnchor(w2, Qt::AnchorBottom, l, Qt::AnchorBottom);
- l->addAnchor(w3, Qt::AnchorTop, l, Qt::AnchorTop);
- l->addAnchor(w3, Qt::AnchorBottom, l, Qt::AnchorBottom);
+ l->addAnchors(l, w1, Qt::Vertical);
+ l->addAnchors(l, w2, Qt::Vertical);
+ l->addAnchors(l, w3, Qt::Vertical);
QGraphicsAnchor *anchor = l->anchor(w3, Qt::AnchorRight, l, Qt::AnchorRight);
anchor->setSpacing(10);