Cppcheck warnings.
--HG-- branch : develop
This commit is contained in:
parent
bfff8ccb96
commit
fb5a9c64b2
|
@ -1738,7 +1738,7 @@ void TMainWindow::SetupMenu()
|
|||
recentFileActs[i] = action;
|
||||
connect(action, &QAction::triggered, [action, this]()
|
||||
{
|
||||
if (action)
|
||||
if (action != nullptr)
|
||||
{
|
||||
const QString filePath = action->data().toString();
|
||||
if (not filePath.isEmpty())
|
||||
|
|
|
@ -3617,7 +3617,8 @@ void MainWindow::CreateActions()
|
|||
recentFileActs[i] = action;
|
||||
connect(recentFileActs[i], &QAction::triggered, [action, this]()
|
||||
{
|
||||
if (action)
|
||||
// cppcheck-suppress nullPointerRedundantCheck
|
||||
if (action != nullptr)
|
||||
{
|
||||
const QString filePath = action->data().toString();
|
||||
if (not filePath.isEmpty())
|
||||
|
|
|
@ -43,7 +43,7 @@ class VAbstractArcData : public QSharedData
|
|||
public:
|
||||
VAbstractArcData();
|
||||
VAbstractArcData(const VPointF ¢er, qreal f1, const QString &formulaF1, qreal f2, const QString &formulaF2);
|
||||
VAbstractArcData(const QString &formulaLength, VPointF center, qreal f1, QString formulaF1);
|
||||
VAbstractArcData(const QString &formulaLength, const VPointF ¢er, qreal f1, const QString &formulaF1);
|
||||
VAbstractArcData(const VPointF ¢er, qreal f1);
|
||||
VAbstractArcData(const VPointF ¢er, qreal f1, qreal f2);
|
||||
VAbstractArcData(const VAbstractArcData &arc);
|
||||
|
@ -96,7 +96,8 @@ VAbstractArcData::VAbstractArcData(const VPointF ¢er, qreal f1, const QStrin
|
|||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VAbstractArcData::VAbstractArcData(const QString &formulaLength, VPointF center, qreal f1, QString formulaF1)
|
||||
VAbstractArcData::VAbstractArcData(const QString &formulaLength, const VPointF ¢er, qreal f1,
|
||||
const QString &formulaF1)
|
||||
: f1(f1),
|
||||
formulaF1(formulaF1),
|
||||
f2(0),
|
||||
|
|
|
@ -41,7 +41,7 @@ class VArcData : public QSharedData
|
|||
{
|
||||
public:
|
||||
VArcData();
|
||||
VArcData(qreal radius, QString formulaRadius);
|
||||
VArcData(qreal radius, const QString &formulaRadius);
|
||||
explicit VArcData(qreal radius);
|
||||
VArcData(const VArcData &arc);
|
||||
virtual ~VArcData();
|
||||
|
@ -63,7 +63,7 @@ VArcData::VArcData()
|
|||
{}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VArcData::VArcData(qreal radius, QString formulaRadius)
|
||||
VArcData::VArcData(qreal radius, const QString &formulaRadius)
|
||||
: radius(radius),
|
||||
formulaRadius(formulaRadius)
|
||||
{}
|
||||
|
|
|
@ -64,8 +64,8 @@ VSpline::VSpline ( const VSpline & spline )
|
|||
* @param kAsm1 coefficient of length first control line.
|
||||
* @param kAsm2 coefficient of length second control line.
|
||||
*/
|
||||
VSpline::VSpline (VPointF p1, VPointF p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve,
|
||||
quint32 idObject, Draw mode)
|
||||
VSpline::VSpline (const VPointF &p1, const VPointF &p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2,
|
||||
qreal kCurve, quint32 idObject, Draw mode)
|
||||
: VAbstractCubicBezier(GOType::Spline, idObject, mode),
|
||||
d(new VSplineData(p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve))
|
||||
{
|
||||
|
@ -80,7 +80,8 @@ VSpline::VSpline (VPointF p1, VPointF p4, qreal angle1, qreal angle2, qreal kAsm
|
|||
* @param p3 second control point.
|
||||
* @param p4 second point spline.
|
||||
*/
|
||||
VSpline::VSpline (VPointF p1, QPointF p2, QPointF p3, VPointF p4, quint32 idObject, Draw mode)
|
||||
VSpline::VSpline (const VPointF &p1, const QPointF &p2, const QPointF &p3, const VPointF &p4, quint32 idObject,
|
||||
Draw mode)
|
||||
:VAbstractCubicBezier(GOType::Spline, idObject, mode), d(new VSplineData(p1, p2, p3, p4))
|
||||
{
|
||||
CreateName();
|
||||
|
@ -101,7 +102,7 @@ VSpline::VSpline (VPointF p1, QPointF p2, QPointF p3, VPointF p4, quint32 idObje
|
|||
* @param c2Length length from second point to first control point.
|
||||
* @param c2LengthFormula formula length from second point to first control point.
|
||||
*/
|
||||
VSpline::VSpline(VPointF p1, VPointF p4, qreal angle1, const QString &angle1Formula, qreal angle2,
|
||||
VSpline::VSpline(const VPointF &p1, const VPointF &p4, qreal angle1, const QString &angle1Formula, qreal angle2,
|
||||
const QString &angle2Formula, qreal c1Length, const QString &c1LengthFormula, qreal c2Length,
|
||||
const QString &c2LengthFormula, quint32 idObject, Draw mode)
|
||||
: VAbstractCubicBezier(GOType::Spline, idObject, mode),
|
||||
|
|
|
@ -55,11 +55,11 @@ class VSpline :public VAbstractCubicBezier
|
|||
public:
|
||||
VSpline();
|
||||
VSpline (const VSpline &spline );
|
||||
VSpline (VPointF p1, VPointF p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve,
|
||||
VSpline (const VPointF &p1, const VPointF &p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve,
|
||||
quint32 idObject = 0, Draw mode = Draw::Calculation);
|
||||
VSpline (VPointF p1, QPointF p2, QPointF p3, VPointF p4, quint32 idObject = 0,
|
||||
VSpline (const VPointF &p1, const QPointF &p2, const QPointF &p3, const VPointF &p4, quint32 idObject = 0,
|
||||
Draw mode = Draw::Calculation);
|
||||
VSpline (VPointF p1, VPointF p4, qreal angle1, const QString &angle1Formula, qreal angle2,
|
||||
VSpline (const VPointF &p1, const VPointF &p4, qreal angle1, const QString &angle1Formula, qreal angle2,
|
||||
const QString &angle2Formula, qreal c1Length, const QString &c1LengthFormula, qreal c2Length,
|
||||
const QString &c2LengthFormula, quint32 idObject = 0, Draw mode = Draw::Calculation);
|
||||
VSpline Rotate(const QPointF &originPoint, qreal degrees, const QString &prefix = QString()) const;
|
||||
|
|
Loading…
Reference in New Issue
Block a user