Clang warnings.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-11-01 10:42:32 +02:00
parent c0f60ab90a
commit d134e8b367
23 changed files with 140 additions and 102 deletions

View File

@ -66,7 +66,8 @@ public:
public slots:
void ProcessCMD();
void ShowToolTip(const QString &toolTip);
virtual void ShowToolTip(const QString &toolTip) Q_DECL_OVERRIDE;
signals:
void RefreshHistory();

View File

@ -367,7 +367,7 @@ void MainWindowsNoGUI::PrintPages(QPrinter *printer)
}
int paperIndex = -1;
isTiled ? paperIndex = poster->at(index).index : paperIndex = index;
isTiled ? paperIndex = static_cast<int>(poster->at(index).index) : paperIndex = index;
auto *paper = qgraphicsitem_cast<QGraphicsRectItem *>(papers.at(paperIndex));
if (paper)

View File

@ -42,7 +42,7 @@
class QGraphicsScene;
class QPrinter;
class PosterData;
struct PosterData;
class MainWindowsNoGUI : public VAbstractMainWindow
{

View File

@ -683,7 +683,7 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
detail.GetPatternPieceData().SetLabelWidth(dLW);
qreal dLH = GetParametrDouble(element, VToolDetail::AttrHeight, "0");
detail.GetPatternPieceData().SetLabelHeight(dLH);
int iFS = GetParametrUInt(element, VToolDetail::AttrFont, "0");
int iFS = static_cast<int>(GetParametrUInt(element, VToolDetail::AttrFont, "0"));
detail.GetPatternPieceData().SetFontSize(iFS);
qreal dRot = GetParametrDouble(element, VToolDetail::AttrRotation, "0");
detail.GetPatternPieceData().SetRotation(dRot);
@ -698,7 +698,7 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
{
mcp.m_qsMaterialUserDef = GetParametrString(domMCP, AttrUserDefined, "");
}
mcp.m_iCutNumber = GetParametrUInt(domMCP, AttrCutNumber, 0);
mcp.m_iCutNumber = static_cast<int>(GetParametrUInt(domMCP, AttrCutNumber, 0));
mcp.m_ePlacement = PlacementType(GetParametrUInt(domMCP, AttrPlacement, 0));
detail.GetPatternPieceData().Append(mcp);
}
@ -714,7 +714,7 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
detail.GetPatternInfo().SetLabelWidth(dLW);
qreal dLH = GetParametrDouble(element, VToolDetail::AttrHeight, "0");
detail.GetPatternInfo().SetLabelHeight(dLH);
int iFS = GetParametrUInt(element, VToolDetail::AttrFont, "0");
int iFS = static_cast<int>(GetParametrUInt(element, VToolDetail::AttrFont, "0"));
detail.GetPatternInfo().SetFontSize(iFS);
qreal dRot = GetParametrDouble(element, VToolDetail::AttrRotation, "0");
detail.GetPatternInfo().SetRotation(dRot);

View File

@ -589,9 +589,9 @@ void VLayoutDetail::CreateTextItems()
mat.translate(points.at(0).x(), points.at(0).y());
mat.rotate(qRadiansToDegrees(dAng));
for (int i = 0; i < d->m_tmDetail.GetCount(); ++i)
for (int i = 0; i < d->m_tmDetail.GetOutputLinesCount(); ++i)
{
const TextLine& tl = d->m_tmDetail.GetLine(i);
const TextLine& tl = d->m_tmDetail.GetOutputLine(i);
QFont fnt = d->m_tmDetail.GetFont();
fnt.setPixelSize(d->m_tmDetail.GetFont().pixelSize() + tl.m_iFontSize);
fnt.setWeight(tl.m_eFontWeight);
@ -633,9 +633,9 @@ void VLayoutDetail::CreateTextItems()
mat.translate(points.at(0).x(), points.at(0).y());
mat.rotate(qRadiansToDegrees(dAng));
for (int i = 0; i < d->m_tmPattern.GetCount(); ++i)
for (int i = 0; i < d->m_tmPattern.GetOutputLinesCount(); ++i)
{
const TextLine& tl = d->m_tmPattern.GetLine(i);
const TextLine& tl = d->m_tmPattern.GetOutputLine(i);
QFont fnt = d->m_tmPattern.GetFont();
fnt.setPixelSize(d->m_tmPattern.GetFont().pixelSize() + tl.m_iFontSize);
fnt.setWeight(tl.m_eFontWeight);
@ -685,7 +685,7 @@ QGraphicsItem* VLayoutDetail::GetTextItem(int i) const
if (d->mirror == true)
{
QVector<QPointF> points;
if (i < d->m_tmDetail.GetCount())
if (i < d->m_tmDetail.GetOutputLinesCount())
{
points = Map(Mirror(d->detailLabel));
}
@ -796,7 +796,7 @@ QPointF VLayoutDetail::RotatePoint(const QPointF &ptCenter, const QPointF& pt, q
/**
* @brief VLayoutDetail::Mirror if the detail layout is rotated, this method will flip the
* label points over vertical axis, which goes through the center of the label
* @param list of 4 label vertices
* @param points list of 4 label vertices
* @return list of flipped points
*/
QVector<QPointF> VLayoutDetail::Mirror(const QVector<QPointF> &points) const

View File

@ -66,9 +66,9 @@ QVector<PosterData> VPoster::Calc(const QRect &imageRect, int page) const
for (int j=0; j< columns; j++)
{
PosterData data = Cut(i, j, imageRect);
data.index = page;
data.rows = rows;
data.columns = columns;
data.index = static_cast<quint32>(page);
data.rows = static_cast<quint32>(rows);
data.columns = static_cast<quint32>(columns);
poster.append(data);
}
}
@ -253,8 +253,8 @@ PosterData VPoster::Cut(int i, int j, const QRect &imageRect) const
SCASSERT(y <= imageRect.height());
PosterData data;
data.row = i;
data.column = j;
data.row = static_cast<quint32>(i);
data.column = static_cast<quint32>(j);
data.rect = QRect(x, y, PageRect().width(), PageRect().height());
return data;

View File

@ -62,9 +62,27 @@ VTextManager::VTextManager()
VTextManager::~VTextManager()
{}
//---------------------------------------------------------------------------------------------------------------------
VTextManager::VTextManager(const VTextManager &text)
: m_font(text.GetFont()), m_liLines(text.GetAllSourceLines()), m_liOutput(text.GetAllOutputLines())
{}
//---------------------------------------------------------------------------------------------------------------------
VTextManager &VTextManager::operator=(const VTextManager &text)
{
if ( &text == this )
{
return *this;
}
m_font = text.GetFont();
m_liLines = text.GetAllSourceLines();
m_liOutput = text.GetAllOutputLines();
return *this;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::GetSpacing returns the vertical spacing between the lines
* @brief GetSpacing returns the vertical spacing between the lines
* @return
*/
int VTextManager::GetSpacing() const
@ -74,7 +92,7 @@ int VTextManager::GetSpacing() const
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::SetFont set the text base font
* @brief SetFont set the text base font
* @param font text base font
*/
void VTextManager::SetFont(const QFont& font)
@ -84,7 +102,7 @@ void VTextManager::SetFont(const QFont& font)
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::GetFont returns the text base font
* @brief GetFont returns the text base font
* @return text base font
*/
const QFont& VTextManager::GetFont() const
@ -94,7 +112,7 @@ const QFont& VTextManager::GetFont() const
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::SetFontSize sets the font size
* @brief SetFontSize sets the font size
* @param iFS font size in pixels
*/
void VTextManager::SetFontSize(int iFS)
@ -102,52 +120,64 @@ void VTextManager::SetFontSize(int iFS)
m_font.setPixelSize(iFS);
}
//---------------------------------------------------------------------------------------------------------------------
QList<TextLine> VTextManager::GetAllSourceLines() const
{
return m_liLines;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::AddLine add new text line to the list
* @brief AddSourceLine add new text line to the list
* @param tl text line object to be added
*/
void VTextManager::AddLine(const TextLine& tl)
void VTextManager::AddSourceLine(const TextLine& tl)
{
m_liLines << tl;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::Clear deletes the list of texts
* @brief ClearSourceLines deletes the list of texts
*/
void VTextManager::Clear()
void VTextManager::ClearSourceLines()
{
m_liLines.clear();
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::GetCount returns the number of output text lines
* @brief VTextManager::GetOutputLinesCount returns the number of output text lines
* @return number of output text lines
*/
int VTextManager::GetCount() const
int VTextManager::GetOutputLinesCount() const
{
return m_liOutput.count();
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::GetSourceLineCount returns the number of input text lines
* @brief VTextManager::GetSourceLinesCount returns the number of input text lines
* @return number of text lines that were added to the list by calling AddLine
*/
int VTextManager::GetSourceLineCount() const
int VTextManager::GetSourceLinesCount() const
{
return m_liLines.count();
}
//---------------------------------------------------------------------------------------------------------------------
QList<TextLine> VTextManager::GetAllOutputLines() const
{
return m_liOutput;
}
//---------------------------------------------------------------------------------------------------------------------
/**
* @brief VTextManager::GetLine returns the i-th output text line
* @param i index of the output text line
* @return i-th output text line
*/
const TextLine& VTextManager::GetLine(int i) const
const TextLine& VTextManager::GetOutputLine(int i) const
{
return m_liOutput[i];
}
@ -232,7 +262,7 @@ void VTextManager::FitFontSize(qreal fW, qreal fH)
*/
void VTextManager::Update(const QString& qsName, const VPatternPieceData& data)
{
Clear();
ClearSourceLines();
TextLine tl;
// all text must be centered and normal style!
tl.m_eAlign = Qt::AlignCenter;
@ -244,7 +274,7 @@ void VTextManager::Update(const QString& qsName, const VPatternPieceData& data)
{
tl.m_eFontWeight = QFont::Bold;
tl.m_iFontSize = 6;
AddLine(tl);
AddSourceLine(tl);
}
// name
tl.m_qsText = qsName;
@ -252,7 +282,7 @@ void VTextManager::Update(const QString& qsName, const VPatternPieceData& data)
{
tl.m_eFontWeight = QFont::DemiBold;
tl.m_iFontSize = 2;
AddLine(tl);
AddSourceLine(tl);
}
// MCP
QStringList qslMaterials;
@ -281,7 +311,7 @@ void VTextManager::Update(const QString& qsName, const VPatternPieceData& data)
}
tl.m_qsText = qsText.arg(qsMat).arg(mcp.m_iCutNumber).
arg(qslPlace[int(mcp.m_ePlacement)]);
AddLine(tl);
AddSourceLine(tl);
}
}
}
@ -293,7 +323,7 @@ void VTextManager::Update(const QString& qsName, const VPatternPieceData& data)
*/
void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeight)
{
Clear();
ClearSourceLines();
TextLine tl;
// all information must be centered
tl.m_eAlign = Qt::AlignCenter;
@ -305,7 +335,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig
tl.m_eFontWeight = QFont::DemiBold;
tl.m_eStyle = QFont::StyleNormal;
tl.m_iFontSize = 4;
AddLine(tl);
AddSourceLine(tl);
}
// Pattern name
tl.m_qsText = pDoc->GetPatternName();
@ -314,7 +344,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig
tl.m_eFontWeight = QFont::Normal;
tl.m_eStyle = QFont::StyleNormal;
tl.m_iFontSize = 2;
AddLine(tl);
AddSourceLine(tl);
}
// Pattern number
tl.m_qsText = pDoc->GetPatternNumber();
@ -323,7 +353,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig
tl.m_eFontWeight = QFont::Normal;
tl.m_eStyle = QFont::StyleNormal;
tl.m_iFontSize = 0;
AddLine(tl);
AddSourceLine(tl);
}
// Customer name
tl.m_qsText = pDoc->GetCustomerName();
@ -332,7 +362,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig
tl.m_eFontWeight = QFont::Normal;
tl.m_eStyle = QFont::StyleItalic;
tl.m_iFontSize = 0;
AddLine(tl);
AddSourceLine(tl);
}
// Size
tl.m_qsText = pDoc->GetPatternSize();
@ -349,7 +379,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig
tl.m_eFontWeight = QFont::Normal;
tl.m_eStyle = QFont::StyleNormal;
tl.m_iFontSize = 0;
AddLine(tl);
AddSourceLine(tl);
}
// Measurements
tl.m_qsText = QFileInfo(pDoc->MPath()).fileName();
@ -358,7 +388,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig
tl.m_eFontWeight = QFont::Normal;
tl.m_eStyle = QFont::StyleNormal;
tl.m_iFontSize = 0;
AddLine(tl);
AddSourceLine(tl);
}
// Date
QDate date;
@ -372,7 +402,7 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig
tl.m_eFontWeight = QFont::Normal;
tl.m_eStyle = QFont::StyleNormal;
tl.m_iFontSize = 0;
AddLine(tl);
AddSourceLine(tl);
}
}

View File

@ -73,27 +73,37 @@ public:
VTextManager();
virtual ~VTextManager();
virtual int GetSpacing() const;
void SetFont(const QFont& font);
const QFont& GetFont() const;
void SetFontSize(int iFS);
void AddLine(const TextLine& tl);
void Clear();
int GetCount() const;
int GetSourceLineCount() const;
const TextLine& GetLine(int i) const;
bool IsBigEnough(qreal fW, qreal fH, int iFontSize, qreal& fMinW, qreal& fMinH);
void FitFontSize(qreal fW, qreal fH);
void Update(const QString& qsName, const VPatternPieceData& data);
void Update(const VAbstractPattern* pDoc, qreal dSize, qreal dHeight);
VTextManager(const VTextManager &text);
VTextManager &operator=(const VTextManager &text);
virtual int GetSpacing() const;
void SetFont(const QFont& font);
const QFont& GetFont() const;
void SetFontSize(int iFS);
void FitFontSize(qreal fW, qreal fH);
QList<TextLine> GetAllSourceLines() const;
void AddSourceLine(const TextLine& tl);
void ClearSourceLines();
int GetSourceLinesCount() const;
int GetOutputLinesCount() const;
QList<TextLine> GetAllOutputLines() const;
const TextLine& GetOutputLine(int i) const;
bool IsBigEnough(qreal fW, qreal fH, int iFontSize, qreal& fMinW, qreal& fMinH);
void Update(const QString& qsName, const VPatternPieceData& data);
void Update(const VAbstractPattern* pDoc, qreal dSize, qreal dHeight);
protected:
static QStringList SplitString(const QString& qs, qreal fW, const QFontMetrics& fm);
static QStringList SplitString(const QString& qs, qreal fW, const QFontMetrics& fm);
private:
QFont m_font;
QList<TextLine> m_liLines;
QList<TextLine> m_liOutput;
QFont m_font;
QList<TextLine> m_liLines;
QList<TextLine> m_liOutput;
};
#endif // VTEXTMANAGER_H

View File

@ -50,13 +50,20 @@ public:
QxtCsvModelPrivate() : csvData(), header(), maxColumn(0), quoteMode(QxtCsvModel::DefaultQuoteMode)
{}
QXT_DECLARE_PUBLIC(QxtCsvModel)
virtual ~QxtCsvModelPrivate();
QList<QStringList> csvData;
QStringList header;
int maxColumn;
QxtCsvModel::QuoteMode quoteMode;
private:
Q_DISABLE_COPY(QxtCsvModelPrivate)
};
QxtCsvModelPrivate::~QxtCsvModelPrivate()
{}
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Weffc++")

View File

@ -28,6 +28,7 @@
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wold-style-cast")
QT_WARNING_DISABLE_CLANG("-Wold-style-cast")
QT_WARNING_DISABLE_GCC("-Wcast-qual")
#if PREDICATE == EXACT_PREDICATE
@ -452,8 +453,8 @@ static int del_init_seg( delaunay_t *del, int start )
point2d_t *pt0, *pt1;
/* init delaunay */
del->start_point = start;
del->end_point = start + 1;
del->start_point = static_cast<quint32>(start);
del->end_point = static_cast<quint32>(start + 1);
/* setup pt0 and pt1 */
pt0 = del->points[start];
@ -491,8 +492,8 @@ static int del_init_tri( delaunay_t *del, int start )
point2d_t *pt0, *pt1, *pt2;
/* initiate delaunay */
del->start_point = start;
del->end_point = start + 2;
del->start_point = static_cast<quint32>(start);
del->end_point = static_cast<quint32>(start + 2);
/* setup the points */
pt0 = del->points[start];
@ -916,6 +917,7 @@ static void del_link( delaunay_t *result, delaunay_t *left, delaunay_t *right )
/*
* divide and conquer delaunay
*/
void del_divide_and_conquer( delaunay_t *del, int start, int end );
void del_divide_and_conquer( delaunay_t *del, int start, int end )
{
delaunay_t left, right;

View File

@ -118,6 +118,11 @@ QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized")
#else
QT_WARNING_DISABLE_GCC("-Wuninitialized")
#endif
QT_WARNING_DISABLE_CLANG("-Wold-style-cast")
QT_WARNING_DISABLE_CLANG("-Wmissing-variable-declarations")
QT_WARNING_DISABLE_CLANG("-Wfloat-equal")
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
QT_WARNING_DISABLE_CLANG("-Wconditional-uninitialized")
/* On some machines, the exact arithmetic routines might be defeated by the */
/* use of internal extended precision floating-point registers. Sometimes */

View File

@ -38,11 +38,6 @@ VGrainlineGeometry::VGrainlineGeometry()
//---------------------------------------------------------------------------------------------------------------------
VGrainlineGeometry::~VGrainlineGeometry()
{}
//---------------------------------------------------------------------------------------------------------------------
QPointF VGrainlineGeometry::GetPos() const
{
return m_ptPos;

View File

@ -49,9 +49,7 @@ public:
atRear
};
public:
VGrainlineGeometry();
~VGrainlineGeometry();
// methods, which set and return values of different parameters
QPointF GetPos() const;

View File

@ -42,10 +42,6 @@ VPatternInfoGeometry::VPatternInfoGeometry()
m_dRotation = 0;
}
//---------------------------------------------------------------------------------------------------------------------
VPatternInfoGeometry::~VPatternInfoGeometry()
{}
//---------------------------------------------------------------------------------------------------------------------
QPointF VPatternInfoGeometry::GetPos() const
{

View File

@ -43,7 +43,6 @@ class VPatternInfoGeometry
{
public:
VPatternInfoGeometry();
~VPatternInfoGeometry();
// methods, which set up label parameters
QPointF GetPos() const;

View File

@ -41,10 +41,6 @@ VPatternPieceData::VPatternPieceData()
m_iFontSize(MIN_FONT_SIZE), m_dRotation(0), m_bVisible(true)
{}
//---------------------------------------------------------------------------------------------------------------------
VPatternPieceData::~VPatternPieceData()
{}
//---------------------------------------------------------------------------------------------------------------------
void VPatternPieceData::Append(const MaterialCutPlacement& rMCP)
{

View File

@ -78,7 +78,6 @@ class VPatternPieceData
{
public:
VPatternPieceData();
~VPatternPieceData();
// methods, which operate on MaterialCutPlacement container
void Append(const MaterialCutPlacement& rMCP);

View File

@ -108,9 +108,9 @@ void VTextGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
QFont fnt = m_tm.GetFont();
// draw text lines
int iY = 0;
for (int i = 0; i < m_tm.GetCount(); ++i)
for (int i = 0; i < m_tm.GetOutputLinesCount(); ++i)
{
const TextLine& tl = m_tm.GetLine(i);
const TextLine& tl = m_tm.GetOutputLine(i);
fnt.setPixelSize(m_tm.GetFont().pixelSize() + tl.m_iFontSize);
fnt.setWeight(tl.m_eFontWeight);
fnt.setStyle(tl.m_eStyle);
@ -195,7 +195,7 @@ bool VTextGraphicsItem::IsIdle() const
*/
void VTextGraphicsItem::AddLine(const TextLine& tl)
{
m_tm.AddLine(tl);
m_tm.AddSourceLine(tl);
qreal fW = MIN_W;
qreal fH = m_iMinH;
qreal fMinW;
@ -220,7 +220,7 @@ void VTextGraphicsItem::AddLine(const TextLine& tl)
*/
void VTextGraphicsItem::Clear()
{
m_tm.Clear();
m_tm.ClearSourceLines();
}
//---------------------------------------------------------------------------------------------------------------------
@ -346,7 +346,7 @@ void VTextGraphicsItem::UpdateData(const VAbstractPattern* pDoc, qreal dSize, qr
*/
int VTextGraphicsItem::GetTextLines() const
{
return m_tm.GetCount();
return m_tm.GetOutputLinesCount();
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -121,8 +121,8 @@ VToolUnionDetails::VToolUnionDetails(VAbstractPattern *doc, VContainer *data, co
* @param det detail what we union.
* @param i index node in detail.
* @param idTool id tool union details.
* @param children
* @param drawName
* @param children list of children
* @param drawName name of pattern piece
* @param dx bias node x axis.
* @param dy bias node y axis.
* @param pRotate point rotation.
@ -1055,9 +1055,9 @@ quint32 VToolUnionDetails::TakeNextId(QVector<quint32> &children)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
idChild = children.takeFirst();
#else
idChild = children.first();
children.remove(0);
#else
idChild = children.first();
children.remove(0);
#endif
}
else

View File

@ -129,11 +129,11 @@ void VisOperation::RefreshFlippedObjects(const QPointF &firstPoint, const QPoint
const QSharedPointer<VPointF> p = Visualization::data->GeometricObject<VPointF>(id);
++iPoint;
QGraphicsEllipseItem *point = GetPoint(iPoint, supportColor2);
QGraphicsEllipseItem *point = GetPoint(static_cast<quint32>(iPoint), supportColor2);
DrawPoint(point, *p, supportColor2);
++iPoint;
point = GetPoint(iPoint, supportColor);
point = GetPoint(static_cast<quint32>(iPoint), supportColor);
if (object1Id != NULL_ID)
{

View File

@ -71,11 +71,11 @@ int VisOperation::AddFlippedCurve(const QPointF &firstPoint, const QPointF &seco
const QSharedPointer<Item> curve = Visualization::data->template GeometricObject<Item>(id);
++i;
QGraphicsPathItem *path = GetCurve(i, supportColor2);
QGraphicsPathItem *path = GetCurve(static_cast<quint32>(i), supportColor2);
DrawPath(path, curve->GetPath(PathDirection::Show), supportColor2, Qt::SolidLine, Qt::RoundCap);
++i;
path = GetCurve(i, supportColor);
path = GetCurve(static_cast<quint32>(i), supportColor);
if (object1Id != NULL_ID)
{
const Item flipped = curve->Flip(QLineF(firstPoint, secondPoint));

View File

@ -165,7 +165,7 @@ QGraphicsPathItem *VisToolMove::AddOriginCurve(quint32 id, int &i)
const QSharedPointer<Item> curve = Visualization::data->template GeometricObject<Item>(id);
++i;
QGraphicsPathItem *path = GetCurve(i, supportColor2);
QGraphicsPathItem *path = GetCurve(static_cast<quint32>(i), supportColor2);
DrawPath(path, curve->GetPath(PathDirection::Show), supportColor2, Qt::SolidLine, Qt::RoundCap);
return path;
@ -178,7 +178,7 @@ int VisToolMove::AddMovedCurve(qreal angle, qreal length, quint32 id, int i)
const QSharedPointer<Item> curve = Visualization::data->template GeometricObject<Item>(id);
++i;
QGraphicsPathItem *path = GetCurve(i, supportColor);
QGraphicsPathItem *path = GetCurve(static_cast<quint32>(i), supportColor);
const Item moved = curve->Move(length, angle);
DrawPath(path, moved.GetPath(PathDirection::Show), supportColor, Qt::SolidLine, Qt::RoundCap);
@ -233,7 +233,7 @@ QVector<QGraphicsItem *> VisToolMove::CreateOriginObjects(int &iPoint, int &iCur
const QSharedPointer<VPointF> p = Visualization::data->GeometricObject<VPointF>(id);
++iPoint;
QGraphicsEllipseItem *point = GetPoint(iPoint, supportColor2);
QGraphicsEllipseItem *point = GetPoint(static_cast<quint32>(iPoint), supportColor2);
DrawPoint(point, *p, supportColor2);
originObjects.append(point);
@ -288,7 +288,7 @@ void VisToolMove::CreateMovedObjects(int &iPoint, int &iCurve, qreal length, qre
const QSharedPointer<VPointF> p = Visualization::data->GeometricObject<VPointF>(id);
++iPoint;
QGraphicsEllipseItem *point = GetPoint(iPoint, supportColor);
QGraphicsEllipseItem *point = GetPoint(static_cast<quint32>(iPoint), supportColor);
DrawPoint(point, p->Move(length, angle), supportColor);
break;
}

View File

@ -141,11 +141,11 @@ void VisToolRotation::RefreshGeometry()
const QSharedPointer<VPointF> p = Visualization::data->GeometricObject<VPointF>(id);
++iPoint;
QGraphicsEllipseItem *point = GetPoint(iPoint, supportColor2);
QGraphicsEllipseItem *point = GetPoint(static_cast<quint32>(iPoint), supportColor2);
DrawPoint(point, *p, supportColor2);
++iPoint;
point = GetPoint(iPoint, supportColor);
point = GetPoint(static_cast<quint32>(iPoint), supportColor);
if (object1Id != NULL_ID)
{
@ -216,11 +216,11 @@ int VisToolRotation::AddCurve(qreal angle, const QPointF &origin, quint32 id, in
const QSharedPointer<Item> curve = Visualization::data->template GeometricObject<Item>(id);
++i;
QGraphicsPathItem *path = GetCurve(i, supportColor2);
QGraphicsPathItem *path = GetCurve(static_cast<quint32>(i), supportColor2);
DrawPath(path, curve->GetPath(PathDirection::Show), supportColor2, Qt::SolidLine, Qt::RoundCap);
++i;
path = GetCurve(i, supportColor);
path = GetCurve(static_cast<quint32>(i), supportColor);
if (object1Id != NULL_ID)
{
const Item rotated = curve->Rotate(origin, angle);