summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/qgraphicsanchorlayout
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-11 10:34:08 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-14 12:22:01 (GMT)
commit89620720e9969360254f950fc63d131d82dd3471 (patch)
tree1117641c58ac7810549647e01ac26d5ab4845029 /tests/benchmarks/qgraphicsanchorlayout
parent41dbc4406791f82b7e3c1385acc594e22b5b0799 (diff)
downloadQt-89620720e9969360254f950fc63d131d82dd3471.zip
Qt-89620720e9969360254f950fc63d131d82dd3471.tar.gz
Qt-89620720e9969360254f950fc63d131d82dd3471.tar.bz2
API change. This will get rid of the ugly setAnchorSpacing() method.
Say hello to QGraphicsAnchor, move the spacing (and removeAnchor) functionality over to that class. This also opens up for a cleaner API when we add support for size policies or min/pref/max sizes for anchors. Also remove - addLeftAndRightAnchors() - addTopAndBottomAnchors() - addAllAnchors() in favor of - addAnchors(itemA, itemB, Qt::Orientations) API change discussed with Caio and Andreas. Reviewed-by: Alexis
Diffstat (limited to 'tests/benchmarks/qgraphicsanchorlayout')
-rw-r--r--tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 028b3a8..000ab6e 100644
--- a/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -92,8 +92,8 @@ static void setAnchor(QGraphicsAnchorLayout *l,
Qt::AnchorPoint secondEdge,
qreal spacing)
{
- l->addAnchor(firstItem, firstEdge, secondItem, secondEdge);
- l->setAnchorSpacing(firstItem, firstEdge, secondItem, secondEdge, spacing);
+ QGraphicsAnchor *anchor = l->addAnchor(firstItem, firstEdge, secondItem, secondEdge);
+ anchor->setSpacing(spacing);
}
void tst_QGraphicsAnchorLayout::s60_hard_complex_data()