Cppcheck warning.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-02-15 16:07:52 +02:00
parent ff2d9c28fe
commit 18bbca7b9a
2 changed files with 4 additions and 3 deletions

View File

@ -33,12 +33,13 @@
//---------------------------------------------------------------------------------------------------------------------
VisToolPin::VisToolPin(const VContainer *data, QGraphicsItem *parent)
: VisLine(data, parent),
m_point(nullptr)
m_point()
{
this->mainColor = Qt::red;
this->setZValue(2);// Show on top real tool
m_point = new VSimplePoint(NULL_ID, mainColor, *Visualization::data->GetPatternUnit(), &factor);
m_point = QSharedPointer<VSimplePoint>(new VSimplePoint(NULL_ID, mainColor, *Visualization::data->GetPatternUnit(),
&factor));
m_point->SetPointHighlight(true);
m_point->setParentItem(this);
m_point->SetVisualizationMode(true);

View File

@ -45,7 +45,7 @@ public:
enum { Type = UserType + static_cast<int>(Vis::ToolPin)};
private:
Q_DISABLE_COPY(VisToolPin)
VSimplePoint *m_point;
QSharedPointer<VSimplePoint> m_point;
};
#endif // VISTOOLPIN_H