From ccda742aa844509437e1445cde4cfb1ef6d7db25 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 7 May 2018 14:32:17 +0300 Subject: [PATCH] Refactoring. Specifying the "pointer" part outside of auto. --HG-- branch : develop --- src/app/valentina/xml/vpattern.cpp | 4 ++-- .../vtools/dialogs/tools/dialogcubicbezierpath.cpp | 2 +- src/libs/vtools/dialogs/tools/dialogspline.cpp | 8 ++++---- src/libs/vtools/dialogs/tools/dialogsplinepath.cpp | 10 +++++----- .../tools/drawTools/toolcurve/vtoolcubicbezier.cpp | 4 ++-- .../vtools/tools/drawTools/toolcurve/vtoolspline.cpp | 4 ++-- .../tools/drawTools/toolcurve/vtoolsplinepath.cpp | 2 +- .../toolsinglepoint/vtoolpointofintersectioncurves.cpp | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index 2a5dd92c8..f57be943b 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -2424,7 +2424,7 @@ void VPattern::ParseOldToolSpline(VMainGraphicsScene *scene, const QDomElement & const auto p1 = data->GeometricObject(point1); const auto p4 = data->GeometricObject(point4); - auto spline = new VSpline(*p1, *p4, angle1, angle2, kAsm1, kAsm2, kCurve); + auto* spline = new VSpline(*p1, *p4, angle1, angle2, kAsm1, kAsm2, kCurve); if (duplicate > 0) { spline->SetDuplicate(duplicate); @@ -2614,7 +2614,7 @@ void VPattern::ParseOldToolSplinePath(VMainGraphicsScene *scene, const QDomEleme } } - auto path = new VSplinePath(points, kCurve); + auto* path = new VSplinePath(points, kCurve); if (duplicate > 0) { path->SetDuplicate(duplicate); diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp index 17143dd4a..8ed9a04b7 100644 --- a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp @@ -265,7 +265,7 @@ void DialogCubicBezierPath::currentPointChanged(int index) //--------------------------------------------------------------------------------------------------------------------- void DialogCubicBezierPath::NewItem(const VPointF &point) { - auto item = new QListWidgetItem(point.name()); + auto* item = new QListWidgetItem(point.name()); item->setFont(NodeFont(item->font())); item->setData(Qt::UserRole, QVariant::fromValue(point)); diff --git a/src/libs/vtools/dialogs/tools/dialogspline.cpp b/src/libs/vtools/dialogs/tools/dialogspline.cpp index 5eb435993..d0e645b7f 100644 --- a/src/libs/vtools/dialogs/tools/dialogspline.cpp +++ b/src/libs/vtools/dialogs/tools/dialogspline.cpp @@ -287,7 +287,7 @@ void DialogSpline::Length2Changed() //--------------------------------------------------------------------------------------------------------------------- void DialogSpline::FXAngle1() { - auto dialog = new DialogEditWrongFormula(data, toolId, this); + auto* dialog = new DialogEditWrongFormula(data, toolId, this); dialog->setWindowTitle(tr("Edit first control point angle")); QString angle1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle1F->toPlainText(), qApp->Settings()->GetOsSeparator()); @@ -310,7 +310,7 @@ void DialogSpline::FXAngle1() //--------------------------------------------------------------------------------------------------------------------- void DialogSpline::FXAngle2() { - auto dialog = new DialogEditWrongFormula(data, toolId, this); + auto* dialog = new DialogEditWrongFormula(data, toolId, this); dialog->setWindowTitle(tr("Edit second control point angle")); QString angle2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle2F->toPlainText(), qApp->Settings()->GetOsSeparator()); @@ -333,7 +333,7 @@ void DialogSpline::FXAngle2() //--------------------------------------------------------------------------------------------------------------------- void DialogSpline::FXLength1() { - auto dialog = new DialogEditWrongFormula(data, toolId, this); + auto* dialog = new DialogEditWrongFormula(data, toolId, this); dialog->setWindowTitle(tr("Edit first control point length")); QString length1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength1F->toPlainText(), qApp->Settings()->GetOsSeparator()); @@ -356,7 +356,7 @@ void DialogSpline::FXLength1() //--------------------------------------------------------------------------------------------------------------------- void DialogSpline::FXLength2() { - auto dialog = new DialogEditWrongFormula(data, toolId, this); + auto* dialog = new DialogEditWrongFormula(data, toolId, this); dialog->setWindowTitle(tr("Edit second control point length")); QString length2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength2F->toPlainText(), qApp->Settings()->GetOsSeparator()); diff --git a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp index 210677775..c7d302ed5 100644 --- a/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp +++ b/src/libs/vtools/dialogs/tools/dialogsplinepath.cpp @@ -412,7 +412,7 @@ void DialogSplinePath::Length2Changed() //--------------------------------------------------------------------------------------------------------------------- void DialogSplinePath::FXAngle1() { - auto dialog = new DialogEditWrongFormula(data, toolId, this); + auto* dialog = new DialogEditWrongFormula(data, toolId, this); dialog->setWindowTitle(tr("Edit first control point angle")); QString angle1F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditAngle1F->toPlainText(), @@ -437,7 +437,7 @@ void DialogSplinePath::FXAngle1() //--------------------------------------------------------------------------------------------------------------------- void DialogSplinePath::FXAngle2() { - auto dialog = new DialogEditWrongFormula(data, toolId, this); + auto* dialog = new DialogEditWrongFormula(data, toolId, this); dialog->setWindowTitle(tr("Edit second control point angle")); QString angle2F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditAngle2F->toPlainText(), @@ -462,7 +462,7 @@ void DialogSplinePath::FXAngle2() //--------------------------------------------------------------------------------------------------------------------- void DialogSplinePath::FXLength1() { - auto dialog = new DialogEditWrongFormula(data, toolId, this); + auto* dialog = new DialogEditWrongFormula(data, toolId, this); dialog->setWindowTitle(tr("Edit first control point length")); QString length1F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditLength1F->toPlainText(), @@ -487,7 +487,7 @@ void DialogSplinePath::FXLength1() //--------------------------------------------------------------------------------------------------------------------- void DialogSplinePath::FXLength2() { - auto dialog = new DialogEditWrongFormula(data, toolId, this); + auto* dialog = new DialogEditWrongFormula(data, toolId, this); dialog->setWindowTitle(tr("Edit second control point length")); QString length2F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditLength2F->toPlainText(), @@ -723,7 +723,7 @@ void DialogSplinePath::NewItem(const VSplinePoint &point) flagAngle2.append(true); flagLength2.append(true); - auto item = new QListWidgetItem(point.P().name()); + auto* item = new QListWidgetItem(point.P().name()); item->setFont(NodeFont(item->font())); item->setData(Qt::UserRole, QVariant::fromValue(point)); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp index 1a06d8698..515f78ced 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolcubicbezier.cpp @@ -93,7 +93,7 @@ VToolCubicBezier *VToolCubicBezier::Create(QSharedPointer dialog, VM initData.typeCreation = Source::FromGui; initData.spline = new VCubicBezier(dialogTool->GetSpline()); - auto spl = Create(initData); + auto* spl = Create(initData); if (spl != nullptr) { @@ -123,7 +123,7 @@ VToolCubicBezier *VToolCubicBezier::Create(VToolCubicBezierInitData initData) if (initData.parse == Document::FullParse) { VAbstractTool::AddRecord(initData.id, Tool::CubicBezier, initData.doc); - auto _spl = new VToolCubicBezier(initData); + auto* _spl = new VToolCubicBezier(initData); initData.scene->addItem(_spl); InitSplineToolConnections(initData.scene, _spl); VAbstractPattern::AddTool(initData.id, _spl); diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp index 6720c7955..d82b89f7c 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolspline.cpp @@ -192,7 +192,7 @@ VToolSpline* VToolSpline::Create(VToolSplineInitData &initData, VSpline *spline) if (initData.parse == Document::FullParse) { VAbstractTool::AddRecord(initData.id, Tool::Spline, initData.doc); - auto _spl = new VToolSpline(initData); + auto* _spl = new VToolSpline(initData); initData.scene->addItem(_spl); InitSplineToolConnections(initData.scene, _spl); VAbstractPattern::AddTool(initData.id, _spl); @@ -215,7 +215,7 @@ VToolSpline *VToolSpline::Create(VToolSplineInitData &initData) auto p1 = initData.data->GeometricObject(initData.point1); auto p4 = initData.data->GeometricObject(initData.point4); - auto spline = new VSpline(*p1, *p4, calcAngle1, initData.a1, calcAngle2, initData.a2, calcLength1, initData.l1, + auto* spline = new VSpline(*p1, *p4, calcAngle1, initData.a1, calcAngle2, initData.a2, calcLength1, initData.l1, calcLength2, initData.l2); if (initData.duplicate > 0) { diff --git a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp index ea1c306a0..bc9e3de6c 100644 --- a/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp +++ b/src/libs/vtools/tools/drawTools/toolcurve/vtoolsplinepath.cpp @@ -220,7 +220,7 @@ VToolSplinePath* VToolSplinePath::Create(VToolSplinePathInitData &initData, VSp //--------------------------------------------------------------------------------------------------------------------- VToolSplinePath *VToolSplinePath::Create(VToolSplinePathInitData &initData) { - auto path = new VSplinePath(); + auto* path = new VSplinePath(); if (initData.duplicate > 0) { diff --git a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp index 25d3fa26b..9627e9eac 100644 --- a/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp +++ b/src/libs/vtools/tools/drawTools/toolpoint/toolsinglepoint/vtoolpointofintersectioncurves.cpp @@ -137,7 +137,7 @@ VToolPointOfIntersectionCurves *VToolPointOfIntersectionCurves::Create(VToolPoin if (initData.parse == Document::FullParse) { VAbstractTool::AddRecord(initData.id, Tool::PointOfIntersectionCurves, initData.doc); - auto point = new VToolPointOfIntersectionCurves(initData); + auto* point = new VToolPointOfIntersectionCurves(initData); initData.scene->addItem(point); InitToolConnections(initData.scene, point); VAbstractPattern::AddTool(initData.id, point);