Skip to content

Commit

Permalink
Examples: Fix Clang warning about hiding QGraphicsItem:::advance()
Browse files Browse the repository at this point in the history
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ö <[email protected]>
  • Loading branch information
FriedemannKleint committed May 2, 2018
1 parent 23b1390 commit 9b8fc8d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/widgets/graphicsview/elasticnodes/graphwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void GraphWidget::timerEvent(QTimerEvent *event)

bool itemsMoved = false;
foreach (Node *node, nodes) {
if (node->advance())
if (node->advancePosition())
itemsMoved = true;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/widgets/graphicsview/elasticnodes/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void Node::calculateForces()
//! [6]

//! [7]
bool Node::advance()
bool Node::advancePosition()
{
if (newPos == pos())
return false;
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets/graphicsview/elasticnodes/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9b8fc8d

Please sign in to comment.