Fix Clang warnings: 'Node::advance' hides overloaded virtual function

warning: 'Node::advance' hides overloaded virtual function [-
Woverloaded-virtual]
    bool advance();
         ^
/usr/include/qt4/QtGui/qgraphicsitem.h:323: hidden overloaded virtual
function 'QGraphicsItem::advance' declared here: different number of
parameters (1 vs 0)
    virtual void advance(int phase);
                 ^
This commit is contained in:
Phenom 2017-03-18 11:32:56 +01:00 committed by csoler
parent 13c8f7d342
commit 9319caffc7
3 changed files with 3 additions and 3 deletions

View File

@ -362,7 +362,7 @@ void GraphWidget::timerEvent(QTimerEvent *event)
bool itemsMoved = false;
foreach (Node *node, _nodes)
if(node->advance())
if(node->progress())
itemsMoved = true;
if (!itemsMoved) {

View File

@ -215,7 +215,7 @@ void Node::calculateForces(const double *map,int width,int height,int W,int H,fl
newPos.setY(qMin(qMax(newPos.y(), sceneRect.top()) , sceneRect.bottom()));
}
bool Node::advance()
bool Node::progress()
{
if(_type == GraphWidget::ELASTIC_NODE_TYPE_OWN)
return false;

View File

@ -77,7 +77,7 @@ public:
std::string descString() const { return _desc_string ; }
void calculateForces(const double *data,int width,int height,int W,int H,float x,float y,float speedf);
bool advance();
bool progress();
QRectF boundingRect() const;
QPainterPath shape() const;