From 1925300ff36f389c8973594dfb4a380c1adff173 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 21 Nov 2022 18:49:41 +0200 Subject: [PATCH] Remove redundant includes. --- src/libs/vgeometry/vabstractarc.h | 1 - src/libs/vgeometry/vabstractarc_p.h | 2 -- src/libs/vgeometry/varc.cpp | 1 + src/libs/vgeometry/varc_p.h | 6 +++--- src/libs/vgeometry/vcubicbezier_p.h | 2 -- src/libs/vgeometry/vellipticalarc.cpp | 2 +- src/libs/vgeometry/vellipticalarc_p.h | 8 +++----- src/libs/vgeometry/vgobject_p.h | 1 - src/libs/vgeometry/vplacelabelitem_p.h | 1 - src/libs/vgeometry/vpointf_p.h | 1 - src/libs/vgeometry/vspline_p.h | 11 +++++------ 11 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/libs/vgeometry/vabstractarc.h b/src/libs/vgeometry/vabstractarc.h index b979481ee..1268f07b5 100644 --- a/src/libs/vgeometry/vabstractarc.h +++ b/src/libs/vgeometry/vabstractarc.h @@ -34,7 +34,6 @@ #include #include -#include "../ifc/ifcdef.h" #include "vabstractcurve.h" #include "vgeometrydef.h" diff --git a/src/libs/vgeometry/vabstractarc_p.h b/src/libs/vgeometry/vabstractarc_p.h index 610f4f1ea..ca4d23c0d 100644 --- a/src/libs/vgeometry/vabstractarc_p.h +++ b/src/libs/vgeometry/vabstractarc_p.h @@ -30,8 +30,6 @@ #define VABSTRACTARC_P_H #include -#include "vgeometrydef.h" -#include "../vmisc/vabstractapplication.h" #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include "../vmisc/diagnostic.h" #endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) diff --git a/src/libs/vgeometry/varc.cpp b/src/libs/vgeometry/varc.cpp index 969e97381..941a73ba7 100644 --- a/src/libs/vgeometry/varc.cpp +++ b/src/libs/vgeometry/varc.cpp @@ -35,6 +35,7 @@ #include "../vmisc/def.h" #include "../vmisc/vmath.h" #include "../vmisc/compatibility.h" +#include "../vmisc/vabstractapplication.h" #include "../ifc/ifcdef.h" #include "vabstractcurve.h" #include "varc_p.h" diff --git a/src/libs/vgeometry/varc_p.h b/src/libs/vgeometry/varc_p.h index f88f3aa7e..1f8a21822 100644 --- a/src/libs/vgeometry/varc_p.h +++ b/src/libs/vgeometry/varc_p.h @@ -30,12 +30,12 @@ #define VARC_P_H #include -#include "vgeometrydef.h" -#include "../vmisc/vabstractvalapplication.h" #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include "../vmisc/diagnostic.h" #endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) +#include "../vmisc/defglobal.h" + QT_WARNING_PUSH QT_WARNING_DISABLE_GCC("-Weffc++") QT_WARNING_DISABLE_GCC("-Wnon-virtual-dtor") @@ -74,7 +74,7 @@ VArcData::VArcData(qreal radius, const QString &formulaRadius) //--------------------------------------------------------------------------------------------------------------------- VArcData::VArcData(qreal radius) : radius(radius), - formulaRadius(QString().number(VAbstractValApplication::VApp()->fromPixel(radius))) + formulaRadius(QString().number(radius)) {} //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vgeometry/vcubicbezier_p.h b/src/libs/vgeometry/vcubicbezier_p.h index c6565db42..f8c6340b9 100644 --- a/src/libs/vgeometry/vcubicbezier_p.h +++ b/src/libs/vgeometry/vcubicbezier_p.h @@ -33,11 +33,9 @@ #include #include "vpointf.h" -#include "../vmisc/vabstractapplication.h" #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include "../vmisc/diagnostic.h" #endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) -#include "../vmisc/vmath.h" QT_WARNING_PUSH QT_WARNING_DISABLE_GCC("-Weffc++") diff --git a/src/libs/vgeometry/vellipticalarc.cpp b/src/libs/vgeometry/vellipticalarc.cpp index f9da95246..2aa36f1aa 100644 --- a/src/libs/vgeometry/vellipticalarc.cpp +++ b/src/libs/vgeometry/vellipticalarc.cpp @@ -284,6 +284,7 @@ VEllipticalArc::VEllipticalArc(qreal length, const VPointF ¢er, qreal radius { CreateName(); FindF2(length); + SetFormulaLength(QString::number(length)); } //--------------------------------------------------------------------------------------------------------------------- @@ -698,7 +699,6 @@ void VEllipticalArc::FindF2(qreal length) SetFormulaF2(QString::number(endAngle), endAngle); lenBez = GetLength(); } - SetFormulaLength(QString::number(VAbstractValApplication::VApp()->fromPixel(lenBez))); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/libs/vgeometry/vellipticalarc_p.h b/src/libs/vgeometry/vellipticalarc_p.h index 9aa8c58d1..8ff56ace9 100644 --- a/src/libs/vgeometry/vellipticalarc_p.h +++ b/src/libs/vgeometry/vellipticalarc_p.h @@ -2,11 +2,9 @@ #define VELLIPTICALARC_P #include -#include "../vmisc/vabstractvalapplication.h" #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include "../vmisc/diagnostic.h" #endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) -#include "vpointf.h" QT_WARNING_PUSH QT_WARNING_DISABLE_GCC("-Weffc++") @@ -69,10 +67,10 @@ VEllipticalArcData::VEllipticalArcData(qreal radius1, qreal radius2, const QStri VEllipticalArcData::VEllipticalArcData(qreal radius1, qreal radius2, qreal rotationAngle) : radius1(radius1), radius2(radius2), - formulaRadius1(QString().number(VAbstractValApplication::VApp()->fromPixel(radius1))), - formulaRadius2(QString().number(VAbstractValApplication::VApp()->fromPixel(radius2))), + formulaRadius1(QString().number(radius1)), + formulaRadius2(QString().number(radius2)), rotationAngle(rotationAngle), - formulaRotationAngle(QString().number(VAbstractValApplication::VApp()->fromPixel(rotationAngle))), + formulaRotationAngle(QString().number(rotationAngle)), m_transform() {} diff --git a/src/libs/vgeometry/vgobject_p.h b/src/libs/vgeometry/vgobject_p.h index a2a1b62d5..53cf22e0b 100644 --- a/src/libs/vgeometry/vgobject_p.h +++ b/src/libs/vgeometry/vgobject_p.h @@ -31,7 +31,6 @@ #include #include "vgeometrydef.h" -#include "../ifc/ifcdef.h" #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include "../vmisc/diagnostic.h" #endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) diff --git a/src/libs/vgeometry/vplacelabelitem_p.h b/src/libs/vgeometry/vplacelabelitem_p.h index 3c156f11c..b09d5c53b 100644 --- a/src/libs/vgeometry/vplacelabelitem_p.h +++ b/src/libs/vgeometry/vplacelabelitem_p.h @@ -30,7 +30,6 @@ #include #include "vgeometrydef.h" -#include "../ifc/ifcdef.h" #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include "../vmisc/diagnostic.h" #endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) diff --git a/src/libs/vgeometry/vpointf_p.h b/src/libs/vgeometry/vpointf_p.h index 4b6b13e0e..5aff8fd63 100644 --- a/src/libs/vgeometry/vpointf_p.h +++ b/src/libs/vgeometry/vpointf_p.h @@ -30,7 +30,6 @@ #define VPOINTF_P_H #include -#include "vgeometrydef.h" #if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include "../vmisc/diagnostic.h" #endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0) diff --git a/src/libs/vgeometry/vspline_p.h b/src/libs/vgeometry/vspline_p.h index dee666f75..633d72643 100644 --- a/src/libs/vgeometry/vspline_p.h +++ b/src/libs/vgeometry/vspline_p.h @@ -31,10 +31,9 @@ #include #include +#include #include "vpointf.h" -#include "../vmisc/vabstractvalapplication.h" -#include "../vmisc/vmath.h" QT_WARNING_PUSH QT_WARNING_DISABLE_GCC("-Weffc++") @@ -140,12 +139,12 @@ VSplineData::VSplineData(VPointF p1, VPointF p4, qreal angle1, qreal angle2, qre QLineF p1p2(p1.x(), p1.y(), p1.x() + L * kAsm1, p1.y()); p1p2.setAngle(angle1); c1Length = p1p2.length(); - c1LengthF = QString().number(VAbstractValApplication::VApp()->fromPixel(c1Length)); + c1LengthF = QString().number(c1Length); QLineF p4p3(p4.x(), p4.y(), p4.x() + L * kAsm2, p4.y()); p4p3.setAngle(angle2); c2Length = p4p3.length(); - c2LengthF = QString().number(VAbstractValApplication::VApp()->fromPixel(c2Length)); + c2LengthF = QString().number(c2Length); } //--------------------------------------------------------------------------------------------------------------------- @@ -168,7 +167,7 @@ VSplineData::VSplineData(VPointF p1, QPointF p2, QPointF p3, VPointF p4) angle1F = QString().number(angle1); c1Length = p1p2.length(); - c1LengthF = QString().number(VAbstractValApplication::VApp()->fromPixel(c1Length)); + c1LengthF = QString().number(c1Length); QLineF p4p3(static_cast(p4), static_cast(p3)); @@ -176,7 +175,7 @@ VSplineData::VSplineData(VPointF p1, QPointF p2, QPointF p3, VPointF p4) angle2F = QString().number(angle2); c2Length = p4p3.length(); - c2LengthF = QString().number(VAbstractValApplication::VApp()->fromPixel(c2Length)); + c2LengthF = QString().number(c2Length); } //---------------------------------------------------------------------------------------------------------------------