Examples: Fix Clang warning about hiding QGraphicsItem:::advance()

In file included from edge.cpp:52:
./node.h(76,10):  warning: 'Node::advance' hides overloaded virtual function [-Woverloaded-virtual]
    bool advance();

Change-Id: I9d437059362c367e452b1b4f16077d4e0abd18de
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This commit is contained in:
Friedemann Kleint 2018-04-27 15:33:21 +02:00
parent 23b139038a
commit 9b8fc8dd13
3 changed files with 3 additions and 3 deletions

View File

@ -174,7 +174,7 @@ void GraphWidget::timerEvent(QTimerEvent *event)
bool itemsMoved = false; bool itemsMoved = false;
foreach (Node *node, nodes) { foreach (Node *node, nodes) {
if (node->advance()) if (node->advancePosition())
itemsMoved = true; itemsMoved = true;
} }

View File

@ -138,7 +138,7 @@ void Node::calculateForces()
//! [6] //! [6]
//! [7] //! [7]
bool Node::advance() bool Node::advancePosition()
{ {
if (newPos == pos()) if (newPos == pos())
return false; return false;

View File

@ -73,7 +73,7 @@ public:
int type() const override { return Type; } int type() const override { return Type; }
void calculateForces(); void calculateForces();
bool advance(); bool advancePosition();
QRectF boundingRect() const override; QRectF boundingRect() const override;
QPainterPath shape() const override; QPainterPath shape() const override;