From dde11ce47c2d83bae685f3ff032ee9e6e372058f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Wed, 7 Oct 2009 11:30:30 +0200 Subject: Make some lines in the autotest more readable. --- .../qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'tests/auto/qgraphicsanchorlayout') diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp index b076631e6f..286ea2da98 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); -- cgit v1.2.3