diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp index 4259aab803a..81928a4ee16 100644 --- a/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp +++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.cpp @@ -174,7 +174,7 @@ void GraphWidget::timerEvent(QTimerEvent *event) bool itemsMoved = false; foreach (Node *node, nodes) { - if (node->advance()) + if (node->advancePosition()) itemsMoved = true; } diff --git a/examples/widgets/graphicsview/elasticnodes/node.cpp b/examples/widgets/graphicsview/elasticnodes/node.cpp index 94df45524a6..71737c984be 100644 --- a/examples/widgets/graphicsview/elasticnodes/node.cpp +++ b/examples/widgets/graphicsview/elasticnodes/node.cpp @@ -138,7 +138,7 @@ void Node::calculateForces() //! [6] //! [7] -bool Node::advance() +bool Node::advancePosition() { if (newPos == pos()) return false; diff --git a/examples/widgets/graphicsview/elasticnodes/node.h b/examples/widgets/graphicsview/elasticnodes/node.h index 487ae0d68ed..43ea1fb24b0 100644 --- a/examples/widgets/graphicsview/elasticnodes/node.h +++ b/examples/widgets/graphicsview/elasticnodes/node.h @@ -73,7 +73,7 @@ class Node : public QGraphicsItem int type() const override { return Type; } void calculateForces(); - bool advance(); + bool advancePosition(); QRectF boundingRect() const override; QPainterPath shape() const override;