Cppcheck warning.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-03-02 11:16:02 +02:00
parent c1866ccdb2
commit 20107a35f8
2 changed files with 13 additions and 14 deletions

View File

@ -267,6 +267,19 @@ QPointF RotatePoint(const QPointF &ptCenter, const QPointF& pt, qreal dAng)
return ptDest + ptCenter;
}
//---------------------------------------------------------------------------------------------------------------------
void CreateLabel(QGraphicsItem *parent, const QPainterPath &path)
{
SCASSERT(parent != nullptr)
if (not path.isEmpty())
{
QGraphicsPathItem* item = new QGraphicsPathItem(parent);
item->setPath(path);
item->setBrush(QBrush(Qt::black));
}
}
}
//---------------------------------------------------------------------------------------------------------------------
@ -789,19 +802,6 @@ void VLayoutPiece::CreateInternalPathItem(int i, QGraphicsItem *parent) const
item->setPen(pen);
}
//---------------------------------------------------------------------------------------------------------------------
void VLayoutPiece::CreateLabel(QGraphicsItem *parent, const QPainterPath &path) const
{
SCASSERT(parent != nullptr)
if (not path.isEmpty())
{
QGraphicsPathItem* item = new QGraphicsPathItem(parent);
item->setPath(path);
item->setBrush(QBrush(Qt::black));
}
}
//---------------------------------------------------------------------------------------------------------------------
QPainterPath VLayoutPiece::LayoutAllowancePath() const
{

View File

@ -126,7 +126,6 @@ private:
QPainterPath CreateLabelText(const QVector<QPointF> &labelShape, const VTextManager &tm) const;
void CreateInternalPathItem(int i, QGraphicsItem *parent) const;
void CreateLabel(QGraphicsItem *parent, const QPainterPath &path) const;
void CreateGrainlineItem(QGraphicsItem *parent) const;
QVector<QPointF> Map(const QVector<QPointF> &points) const;