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>
bb10
parent
23b139038a
commit
9b8fc8dd13
|
|
@ -174,7 +174,7 @@ void GraphWidget::timerEvent(QTimerEvent *event)
|
|||
|
||||
bool itemsMoved = false;
|
||||
foreach (Node *node, nodes) {
|
||||
if (node->advance())
|
||||
if (node->advancePosition())
|
||||
itemsMoved = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ void Node::calculateForces()
|
|||
//! [6]
|
||||
|
||||
//! [7]
|
||||
bool Node::advance()
|
||||
bool Node::advancePosition()
|
||||
{
|
||||
if (newPos == pos())
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ public:
|
|||
int type() const override { return Type; }
|
||||
|
||||
void calculateForces();
|
||||
bool advance();
|
||||
bool advancePosition();
|
||||
|
||||
QRectF boundingRect() const override;
|
||||
QPainterPath shape() const override;
|
||||
|
|
|
|||
Loading…
Reference in New Issue