Refactoring. Specifying the "pointer" part outside of auto.
--HG-- branch : develop
This commit is contained in:
parent
8a255c063e
commit
ccda742aa8
|
@ -2424,7 +2424,7 @@ void VPattern::ParseOldToolSpline(VMainGraphicsScene *scene, const QDomElement &
|
||||||
const auto p1 = data->GeometricObject<VPointF>(point1);
|
const auto p1 = data->GeometricObject<VPointF>(point1);
|
||||||
const auto p4 = data->GeometricObject<VPointF>(point4);
|
const auto p4 = data->GeometricObject<VPointF>(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)
|
if (duplicate > 0)
|
||||||
{
|
{
|
||||||
spline->SetDuplicate(duplicate);
|
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)
|
if (duplicate > 0)
|
||||||
{
|
{
|
||||||
path->SetDuplicate(duplicate);
|
path->SetDuplicate(duplicate);
|
||||||
|
|
|
@ -265,7 +265,7 @@ void DialogCubicBezierPath::currentPointChanged(int index)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogCubicBezierPath::NewItem(const VPointF &point)
|
void DialogCubicBezierPath::NewItem(const VPointF &point)
|
||||||
{
|
{
|
||||||
auto item = new QListWidgetItem(point.name());
|
auto* item = new QListWidgetItem(point.name());
|
||||||
item->setFont(NodeFont(item->font()));
|
item->setFont(NodeFont(item->font()));
|
||||||
item->setData(Qt::UserRole, QVariant::fromValue(point));
|
item->setData(Qt::UserRole, QVariant::fromValue(point));
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@ void DialogSpline::Length2Changed()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSpline::FXAngle1()
|
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"));
|
dialog->setWindowTitle(tr("Edit first control point angle"));
|
||||||
QString angle1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle1F->toPlainText(),
|
QString angle1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle1F->toPlainText(),
|
||||||
qApp->Settings()->GetOsSeparator());
|
qApp->Settings()->GetOsSeparator());
|
||||||
|
@ -310,7 +310,7 @@ void DialogSpline::FXAngle1()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSpline::FXAngle2()
|
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"));
|
dialog->setWindowTitle(tr("Edit second control point angle"));
|
||||||
QString angle2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle2F->toPlainText(),
|
QString angle2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditAngle2F->toPlainText(),
|
||||||
qApp->Settings()->GetOsSeparator());
|
qApp->Settings()->GetOsSeparator());
|
||||||
|
@ -333,7 +333,7 @@ void DialogSpline::FXAngle2()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSpline::FXLength1()
|
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"));
|
dialog->setWindowTitle(tr("Edit first control point length"));
|
||||||
QString length1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength1F->toPlainText(),
|
QString length1F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength1F->toPlainText(),
|
||||||
qApp->Settings()->GetOsSeparator());
|
qApp->Settings()->GetOsSeparator());
|
||||||
|
@ -356,7 +356,7 @@ void DialogSpline::FXLength1()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSpline::FXLength2()
|
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"));
|
dialog->setWindowTitle(tr("Edit second control point length"));
|
||||||
QString length2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength2F->toPlainText(),
|
QString length2F = qApp->TrVars()->TryFormulaFromUser(ui->plainTextEditLength2F->toPlainText(),
|
||||||
qApp->Settings()->GetOsSeparator());
|
qApp->Settings()->GetOsSeparator());
|
||||||
|
|
|
@ -412,7 +412,7 @@ void DialogSplinePath::Length2Changed()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSplinePath::FXAngle1()
|
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"));
|
dialog->setWindowTitle(tr("Edit first control point angle"));
|
||||||
|
|
||||||
QString angle1F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditAngle1F->toPlainText(),
|
QString angle1F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditAngle1F->toPlainText(),
|
||||||
|
@ -437,7 +437,7 @@ void DialogSplinePath::FXAngle1()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSplinePath::FXAngle2()
|
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"));
|
dialog->setWindowTitle(tr("Edit second control point angle"));
|
||||||
|
|
||||||
QString angle2F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditAngle2F->toPlainText(),
|
QString angle2F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditAngle2F->toPlainText(),
|
||||||
|
@ -462,7 +462,7 @@ void DialogSplinePath::FXAngle2()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSplinePath::FXLength1()
|
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"));
|
dialog->setWindowTitle(tr("Edit first control point length"));
|
||||||
|
|
||||||
QString length1F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditLength1F->toPlainText(),
|
QString length1F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditLength1F->toPlainText(),
|
||||||
|
@ -487,7 +487,7 @@ void DialogSplinePath::FXLength1()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogSplinePath::FXLength2()
|
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"));
|
dialog->setWindowTitle(tr("Edit second control point length"));
|
||||||
|
|
||||||
QString length2F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditLength2F->toPlainText(),
|
QString length2F = VTranslateVars::TryFormulaFromUser(ui->plainTextEditLength2F->toPlainText(),
|
||||||
|
@ -723,7 +723,7 @@ void DialogSplinePath::NewItem(const VSplinePoint &point)
|
||||||
flagAngle2.append(true);
|
flagAngle2.append(true);
|
||||||
flagLength2.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->setFont(NodeFont(item->font()));
|
||||||
item->setData(Qt::UserRole, QVariant::fromValue(point));
|
item->setData(Qt::UserRole, QVariant::fromValue(point));
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ VToolCubicBezier *VToolCubicBezier::Create(QSharedPointer<DialogTool> dialog, VM
|
||||||
initData.typeCreation = Source::FromGui;
|
initData.typeCreation = Source::FromGui;
|
||||||
initData.spline = new VCubicBezier(dialogTool->GetSpline());
|
initData.spline = new VCubicBezier(dialogTool->GetSpline());
|
||||||
|
|
||||||
auto spl = Create(initData);
|
auto* spl = Create(initData);
|
||||||
|
|
||||||
if (spl != nullptr)
|
if (spl != nullptr)
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ VToolCubicBezier *VToolCubicBezier::Create(VToolCubicBezierInitData initData)
|
||||||
if (initData.parse == Document::FullParse)
|
if (initData.parse == Document::FullParse)
|
||||||
{
|
{
|
||||||
VAbstractTool::AddRecord(initData.id, Tool::CubicBezier, initData.doc);
|
VAbstractTool::AddRecord(initData.id, Tool::CubicBezier, initData.doc);
|
||||||
auto _spl = new VToolCubicBezier(initData);
|
auto* _spl = new VToolCubicBezier(initData);
|
||||||
initData.scene->addItem(_spl);
|
initData.scene->addItem(_spl);
|
||||||
InitSplineToolConnections(initData.scene, _spl);
|
InitSplineToolConnections(initData.scene, _spl);
|
||||||
VAbstractPattern::AddTool(initData.id, _spl);
|
VAbstractPattern::AddTool(initData.id, _spl);
|
||||||
|
|
|
@ -192,7 +192,7 @@ VToolSpline* VToolSpline::Create(VToolSplineInitData &initData, VSpline *spline)
|
||||||
if (initData.parse == Document::FullParse)
|
if (initData.parse == Document::FullParse)
|
||||||
{
|
{
|
||||||
VAbstractTool::AddRecord(initData.id, Tool::Spline, initData.doc);
|
VAbstractTool::AddRecord(initData.id, Tool::Spline, initData.doc);
|
||||||
auto _spl = new VToolSpline(initData);
|
auto* _spl = new VToolSpline(initData);
|
||||||
initData.scene->addItem(_spl);
|
initData.scene->addItem(_spl);
|
||||||
InitSplineToolConnections(initData.scene, _spl);
|
InitSplineToolConnections(initData.scene, _spl);
|
||||||
VAbstractPattern::AddTool(initData.id, _spl);
|
VAbstractPattern::AddTool(initData.id, _spl);
|
||||||
|
@ -215,7 +215,7 @@ VToolSpline *VToolSpline::Create(VToolSplineInitData &initData)
|
||||||
auto p1 = initData.data->GeometricObject<VPointF>(initData.point1);
|
auto p1 = initData.data->GeometricObject<VPointF>(initData.point1);
|
||||||
auto p4 = initData.data->GeometricObject<VPointF>(initData.point4);
|
auto p4 = initData.data->GeometricObject<VPointF>(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);
|
calcLength2, initData.l2);
|
||||||
if (initData.duplicate > 0)
|
if (initData.duplicate > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -220,7 +220,7 @@ VToolSplinePath* VToolSplinePath::Create(VToolSplinePathInitData &initData, VSp
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VToolSplinePath *VToolSplinePath::Create(VToolSplinePathInitData &initData)
|
VToolSplinePath *VToolSplinePath::Create(VToolSplinePathInitData &initData)
|
||||||
{
|
{
|
||||||
auto path = new VSplinePath();
|
auto* path = new VSplinePath();
|
||||||
|
|
||||||
if (initData.duplicate > 0)
|
if (initData.duplicate > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -137,7 +137,7 @@ VToolPointOfIntersectionCurves *VToolPointOfIntersectionCurves::Create(VToolPoin
|
||||||
if (initData.parse == Document::FullParse)
|
if (initData.parse == Document::FullParse)
|
||||||
{
|
{
|
||||||
VAbstractTool::AddRecord(initData.id, Tool::PointOfIntersectionCurves, initData.doc);
|
VAbstractTool::AddRecord(initData.id, Tool::PointOfIntersectionCurves, initData.doc);
|
||||||
auto point = new VToolPointOfIntersectionCurves(initData);
|
auto* point = new VToolPointOfIntersectionCurves(initData);
|
||||||
initData.scene->addItem(point);
|
initData.scene->addItem(point);
|
||||||
InitToolConnections(initData.scene, point);
|
InitToolConnections(initData.scene, point);
|
||||||
VAbstractPattern::AddTool(initData.id, point);
|
VAbstractPattern::AddTool(initData.id, point);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user