diff --git a/src/app/share/collection/bugs/smart_pattern_#184_case1.val b/src/app/share/collection/bugs/smart_pattern_#184_case1.val index 03220800f..be2f2aa23 100644 --- a/src/app/share/collection/bugs/smart_pattern_#184_case1.val +++ b/src/app/share/collection/bugs/smart_pattern_#184_case1.val @@ -1,7 +1,7 @@ - 0.9.2 + 0.9.1 cm Jeans mit gerader Seitennaht Müller u. Sohn Zeitschrift Ausgabe 10.20 , Seite 47-50 vom PDf (bzw. 14 - 17 vom Herrenteil) diff --git a/src/libs/ifc/xml/vknownmeasurementsconverter.h b/src/libs/ifc/xml/vknownmeasurementsconverter.h index 4687b0096..a2bbbae94 100644 --- a/src/libs/ifc/xml/vknownmeasurementsconverter.h +++ b/src/libs/ifc/xml/vknownmeasurementsconverter.h @@ -43,8 +43,8 @@ public: static const QString KnownMeasurementsMaxVerStr; static const QString CurrentSchema; - static Q_DECL_CONSTEXPR const unsigned KnownMeasurementsMinVer = FormatVersion(1, 0, 0); - static Q_DECL_CONSTEXPR const unsigned KnownMeasurementsMaxVer = FormatVersion(1, 0, 0); + static constexpr const unsigned KnownMeasurementsMinVer = FormatVersion(1, 0, 0); + static constexpr const unsigned KnownMeasurementsMaxVer = FormatVersion(1, 0, 0); static auto XSDSchemas() -> QHash; diff --git a/src/libs/ifc/xml/vlabeltemplateconverter.h b/src/libs/ifc/xml/vlabeltemplateconverter.h index 55887270b..4f68dd5e8 100644 --- a/src/libs/ifc/xml/vlabeltemplateconverter.h +++ b/src/libs/ifc/xml/vlabeltemplateconverter.h @@ -40,8 +40,8 @@ public: static const QString LabelTemplateMaxVerStr; static const QString CurrentSchema; - static Q_DECL_CONSTEXPR const unsigned LabelTemplateMinVer = FormatVersion(1, 0, 0); - static Q_DECL_CONSTEXPR const unsigned LabelTemplateMaxVer = FormatVersion(1, 0, 0); + static constexpr const unsigned LabelTemplateMinVer = FormatVersion(1, 0, 0); + static constexpr const unsigned LabelTemplateMaxVer = FormatVersion(1, 0, 0); static auto XSDSchemas() -> QHash ; diff --git a/src/libs/ifc/xml/vlayoutconverter.h b/src/libs/ifc/xml/vlayoutconverter.h index 5e40f942b..287e55e96 100644 --- a/src/libs/ifc/xml/vlayoutconverter.h +++ b/src/libs/ifc/xml/vlayoutconverter.h @@ -46,8 +46,8 @@ public: static const QString LayoutMaxVerStr; static const QString CurrentSchema; - static Q_DECL_CONSTEXPR const unsigned LayoutMinVer = FormatVersion(0, 1, 0); - static Q_DECL_CONSTEXPR const unsigned LayoutMaxVer = FormatVersion(0, 1, 9); + static constexpr const unsigned LayoutMinVer = FormatVersion(0, 1, 0); + static constexpr const unsigned LayoutMaxVer = FormatVersion(0, 1, 9); static auto XSDSchemas() -> QHash; diff --git a/src/libs/ifc/xml/vpatternconverter.h b/src/libs/ifc/xml/vpatternconverter.h index 92ad6b265..d5812ac5e 100644 --- a/src/libs/ifc/xml/vpatternconverter.h +++ b/src/libs/ifc/xml/vpatternconverter.h @@ -53,8 +53,8 @@ public: static const QString PatternMaxVerStr; static const QString CurrentSchema; - static Q_DECL_CONSTEXPR const unsigned PatternMinVer = FormatVersion(0, 1, 4); - static Q_DECL_CONSTEXPR const unsigned PatternMaxVer = FormatVersion(0, 9, 5); + static constexpr const unsigned PatternMinVer = FormatVersion(0, 1, 4); + static constexpr const unsigned PatternMaxVer = FormatVersion(0, 9, 5); static auto XSDSchemas() -> QHash; diff --git a/src/libs/ifc/xml/vvitconverter.h b/src/libs/ifc/xml/vvitconverter.h index 1fcfb4450..e786c3ba8 100644 --- a/src/libs/ifc/xml/vvitconverter.h +++ b/src/libs/ifc/xml/vvitconverter.h @@ -48,8 +48,8 @@ public: static const QString MeasurementMaxVerStr; static const QString CurrentSchema; - static Q_DECL_CONSTEXPR const unsigned MeasurementMinVer = FormatVersion(0, 2, 0); - static Q_DECL_CONSTEXPR const unsigned MeasurementMaxVer = FormatVersion(0, 6, 1); + static constexpr const unsigned MeasurementMinVer = FormatVersion(0, 2, 0); + static constexpr const unsigned MeasurementMaxVer = FormatVersion(0, 6, 1); static auto XSDSchemas() -> QHash; diff --git a/src/libs/ifc/xml/vvstconverter.h b/src/libs/ifc/xml/vvstconverter.h index 92821cafa..a0db154d3 100644 --- a/src/libs/ifc/xml/vvstconverter.h +++ b/src/libs/ifc/xml/vvstconverter.h @@ -48,8 +48,8 @@ public: static const QString MeasurementMaxVerStr; static const QString CurrentSchema; - static Q_DECL_CONSTEXPR const unsigned MeasurementMinVer = FormatVersion(0, 3, 0); - static Q_DECL_CONSTEXPR const unsigned MeasurementMaxVer = FormatVersion(0, 6, 1); + static constexpr const unsigned MeasurementMinVer = FormatVersion(0, 3, 0); + static constexpr const unsigned MeasurementMaxVer = FormatVersion(0, 6, 1); static auto XSDSchemas() -> QHash; diff --git a/src/libs/ifc/xml/vwatermarkconverter.h b/src/libs/ifc/xml/vwatermarkconverter.h index e88ae5993..aaf3656a9 100644 --- a/src/libs/ifc/xml/vwatermarkconverter.h +++ b/src/libs/ifc/xml/vwatermarkconverter.h @@ -39,8 +39,8 @@ public: static const QString WatermarkMaxVerStr; static const QString CurrentSchema; - static Q_DECL_CONSTEXPR const unsigned WatermarkMinVer = FormatVersion(1, 0, 0); - static Q_DECL_CONSTEXPR const unsigned WatermarkMaxVer = FormatVersion(1, 1, 0); + static constexpr const unsigned WatermarkMinVer = FormatVersion(1, 0, 0); + static constexpr const unsigned WatermarkMaxVer = FormatVersion(1, 1, 0); static auto XSDSchemas() -> QHash ; diff --git a/src/libs/vgeometry/vabstractcubicbezier.cpp b/src/libs/vgeometry/vabstractcubicbezier.cpp index a9a2c1fca..07530d902 100644 --- a/src/libs/vgeometry/vabstractcubicbezier.cpp +++ b/src/libs/vgeometry/vabstractcubicbezier.cpp @@ -523,7 +523,7 @@ auto VAbstractCubicBezier::GetParmT(qreal length) const -> qreal length = base; } - Q_DECL_RELAXED_CONSTEXPR qreal eps = ToPixel(0.00001, Unit::Mm); + constexpr qreal eps = ToPixel(0.00001, Unit::Mm); qreal parT = 0.5; qreal step = parT; qreal splLength = 0; diff --git a/src/libs/vhpgl/vhpglengine.cpp b/src/libs/vhpgl/vhpglengine.cpp index f0a538571..2d36b5a4e 100644 --- a/src/libs/vhpgl/vhpglengine.cpp +++ b/src/libs/vhpgl/vhpglengine.cpp @@ -72,7 +72,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, mCI, ("CI"_L1)) // NOLINT circle QT_WARNING_POP //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto ConvertPixels(qreal pix) -> qreal +constexpr inline auto ConvertPixels(qreal pix) -> qreal { // Default plating measurement in the HP-GL(HP-GL/2) graphics mode is 1/1016"(0.025mm). // 40 plotter units = 1 mm diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index 6b991886e..e55c72e54 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -75,7 +75,7 @@ inline auto IsOutsidePoint(QPointF p1, QPointF p2, QPointF px) -> bool } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR auto PointPosition(const QPointF &p, const QLineF &line) -> qreal +constexpr auto PointPosition(const QPointF &p, const QLineF &line) -> qreal { return (line.p2().x() - line.p1().x()) * (p.y() - line.p1().y()) - (line.p2().y() - line.p1().y()) * (p.x() - line.p1().x()); diff --git a/src/libs/vlayout/vbestsquare.cpp b/src/libs/vlayout/vbestsquare.cpp index c34238625..5dc2eb0cf 100644 --- a/src/libs/vlayout/vbestsquare.cpp +++ b/src/libs/vlayout/vbestsquare.cpp @@ -33,7 +33,7 @@ namespace { //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto Square(QSizeF size) -> qint64 +constexpr inline auto Square(QSizeF size) -> qint64 { return static_cast(size.width() * size.height()); } diff --git a/src/libs/vlayout/vlayoutpoint.h b/src/libs/vlayout/vlayoutpoint.h index e202aa402..fdf660929 100644 --- a/src/libs/vlayout/vlayoutpoint.h +++ b/src/libs/vlayout/vlayoutpoint.h @@ -41,15 +41,15 @@ QT_WARNING_DISABLE_CLANG("-Wnon-virtual-dtor") class VLayoutPoint : public QPointF { public: - Q_DECL_CONSTEXPR VLayoutPoint() = default; - Q_DECL_CONSTEXPR VLayoutPoint(qreal xpos, qreal ypos); - Q_DECL_CONSTEXPR explicit VLayoutPoint(QPointF p); + constexpr VLayoutPoint() = default; + constexpr VLayoutPoint(qreal xpos, qreal ypos); + constexpr explicit VLayoutPoint(QPointF p); - Q_DECL_CONSTEXPR auto TurnPoint() const -> bool; - Q_DECL_CONSTEXPR auto CurvePoint() const -> bool; + constexpr auto TurnPoint() const -> bool; + constexpr auto CurvePoint() const -> bool; - Q_DECL_RELAXED_CONSTEXPR void SetTurnPoint(bool newTurnPoint); - Q_DECL_RELAXED_CONSTEXPR void SetCurvePoint(bool newCurvePoint); + constexpr void SetTurnPoint(bool newTurnPoint); + constexpr void SetCurvePoint(bool newCurvePoint); auto toJson() const -> QJsonObject; auto ToQPointF() const -> QPointF; @@ -104,37 +104,37 @@ auto operator>>(QDataStream &, VLayoutPoint &) -> QDataStream &; #endif //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VLayoutPoint::VLayoutPoint(qreal xpos, qreal ypos) +constexpr inline VLayoutPoint::VLayoutPoint(qreal xpos, qreal ypos) : QPointF(xpos, ypos) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VLayoutPoint::VLayoutPoint(QPointF p) +constexpr inline VLayoutPoint::VLayoutPoint(QPointF p) : QPointF(p) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VLayoutPoint::TurnPoint() const -> bool +constexpr inline auto VLayoutPoint::TurnPoint() const -> bool { return m_turnPoint; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VLayoutPoint::SetTurnPoint(bool newTurnPoint) +constexpr inline void VLayoutPoint::SetTurnPoint(bool newTurnPoint) { m_turnPoint = newTurnPoint; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VLayoutPoint::CurvePoint() const -> bool +constexpr inline auto VLayoutPoint::CurvePoint() const -> bool { return m_curvePoint; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VLayoutPoint::SetCurvePoint(bool newCurvePoint) +constexpr inline void VLayoutPoint::SetCurvePoint(bool newCurvePoint) { m_curvePoint = newCurvePoint; } diff --git a/src/libs/vlayout/vrawsapoint.h b/src/libs/vlayout/vrawsapoint.h index 1667821f4..e8cba7291 100644 --- a/src/libs/vlayout/vrawsapoint.h +++ b/src/libs/vlayout/vrawsapoint.h @@ -41,18 +41,18 @@ QT_WARNING_DISABLE_CLANG("-Wnon-virtual-dtor") class VRawSAPoint final : public VLayoutPoint { public: - Q_DECL_CONSTEXPR VRawSAPoint() = default; - Q_DECL_CONSTEXPR VRawSAPoint(qreal xpos, qreal ypos); - Q_DECL_CONSTEXPR explicit VRawSAPoint(QPointF p); - Q_DECL_CONSTEXPR explicit VRawSAPoint(const VLayoutPoint &p); - Q_DECL_RELAXED_CONSTEXPR VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint); - Q_DECL_RELAXED_CONSTEXPR VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint, bool loopPoint); + constexpr VRawSAPoint() = default; + constexpr VRawSAPoint(qreal xpos, qreal ypos); + constexpr explicit VRawSAPoint(QPointF p); + constexpr explicit VRawSAPoint(const VLayoutPoint &p); + constexpr VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint); + constexpr VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint, bool loopPoint); - Q_DECL_CONSTEXPR auto LoopPoint() const -> bool; - Q_DECL_RELAXED_CONSTEXPR void SetLoopPoint(bool loopPoint); + constexpr auto LoopPoint() const -> bool; + constexpr void SetLoopPoint(bool loopPoint); - Q_DECL_CONSTEXPR auto Primary() const -> bool; - Q_DECL_RELAXED_CONSTEXPR void SetPrimary(bool primary); + constexpr auto Primary() const -> bool; + constexpr void SetPrimary(bool primary); auto toJson() const -> QJsonObject; @@ -65,25 +65,25 @@ Q_DECLARE_METATYPE(VRawSAPoint) // NOLINT Q_DECLARE_TYPEINFO(VRawSAPoint, Q_MOVABLE_TYPE); // NOLINT //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint(qreal xpos, qreal ypos) +constexpr inline VRawSAPoint::VRawSAPoint(qreal xpos, qreal ypos) : VLayoutPoint(xpos, ypos) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p) +constexpr inline VRawSAPoint::VRawSAPoint(QPointF p) : VLayoutPoint(p) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VRawSAPoint::VRawSAPoint(const VLayoutPoint &p) +constexpr inline VRawSAPoint::VRawSAPoint(const VLayoutPoint &p) : VLayoutPoint(p) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint) +constexpr inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint) : VLayoutPoint(p) { SetCurvePoint(curvePoint); @@ -91,7 +91,7 @@ Q_DECL_RELAXED_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePo } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint, bool loopPoint) +constexpr inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePoint, bool turnPoint, bool loopPoint) : VLayoutPoint(p), m_loopPoint(loopPoint) { @@ -100,25 +100,25 @@ Q_DECL_RELAXED_CONSTEXPR inline VRawSAPoint::VRawSAPoint(QPointF p, bool curvePo } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VRawSAPoint::LoopPoint() const -> bool +constexpr inline auto VRawSAPoint::LoopPoint() const -> bool { return m_loopPoint; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VRawSAPoint::SetLoopPoint(bool loopPoint) +constexpr inline void VRawSAPoint::SetLoopPoint(bool loopPoint) { m_loopPoint = loopPoint; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VRawSAPoint::Primary() const -> bool +constexpr inline auto VRawSAPoint::Primary() const -> bool { return m_primary; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VRawSAPoint::SetPrimary(bool primary) +constexpr inline void VRawSAPoint::SetPrimary(bool primary) { m_primary = primary; } diff --git a/src/libs/vlayout/vsapoint.h b/src/libs/vlayout/vsapoint.h index 11b645949..ff871d4c4 100644 --- a/src/libs/vlayout/vsapoint.h +++ b/src/libs/vlayout/vsapoint.h @@ -46,46 +46,46 @@ QT_WARNING_DISABLE_CLANG("-Wnon-virtual-dtor") class VSAPoint final : public VLayoutPoint { public: - Q_DECL_CONSTEXPR VSAPoint() noexcept; + constexpr VSAPoint() noexcept; - Q_DECL_CONSTEXPR VSAPoint(qreal xpos, qreal ypos); - Q_DECL_CONSTEXPR explicit VSAPoint(QPointF p); - Q_DECL_CONSTEXPR explicit VSAPoint(const VLayoutPoint &p); + constexpr VSAPoint(qreal xpos, qreal ypos); + constexpr explicit VSAPoint(QPointF p); + constexpr explicit VSAPoint(const VLayoutPoint &p); - Q_DECL_CONSTEXPR auto GetSABefore() const -> qreal; - Q_DECL_CONSTEXPR auto GetSAAfter() const -> qreal; + constexpr auto GetSABefore() const -> qreal; + constexpr auto GetSAAfter() const -> qreal; - Q_DECL_CONSTEXPR auto GetAngleType() const -> PieceNodeAngle; + constexpr auto GetAngleType() const -> PieceNodeAngle; - Q_DECL_CONSTEXPR auto IsManualPasskmarkLength() const -> bool; - Q_DECL_CONSTEXPR auto IsManualPasskmarkWidth() const -> bool; - Q_DECL_CONSTEXPR auto IsManualPasskmarkAngle() const -> bool; + constexpr auto IsManualPasskmarkLength() const -> bool; + constexpr auto IsManualPasskmarkWidth() const -> bool; + constexpr auto IsManualPasskmarkAngle() const -> bool; - Q_DECL_CONSTEXPR auto GetPasskmarkLength() const -> qreal; - Q_DECL_CONSTEXPR auto GetPasskmarkWidth() const -> qreal; - Q_DECL_CONSTEXPR auto GetPasskmarkAngle() const -> qreal; + constexpr auto GetPasskmarkLength() const -> qreal; + constexpr auto GetPasskmarkWidth() const -> qreal; + constexpr auto GetPasskmarkAngle() const -> qreal; - Q_DECL_RELAXED_CONSTEXPR auto GetSABefore(qreal width) const -> qreal; - Q_DECL_RELAXED_CONSTEXPR auto GetSAAfter(qreal width) const -> qreal; + constexpr auto GetSABefore(qreal width) const -> qreal; + constexpr auto GetSAAfter(qreal width) const -> qreal; - Q_DECL_RELAXED_CONSTEXPR void SetSABefore(qreal value); - Q_DECL_RELAXED_CONSTEXPR void SetSAAfter(qreal value); + constexpr void SetSABefore(qreal value); + constexpr void SetSAAfter(qreal value); - Q_DECL_RELAXED_CONSTEXPR void SetAngleType(PieceNodeAngle value); + constexpr void SetAngleType(PieceNodeAngle value); - Q_DECL_RELAXED_CONSTEXPR void SetManualPasskmarkLength(bool value); - Q_DECL_RELAXED_CONSTEXPR void SetManualPasskmarkWidth(bool value); - Q_DECL_RELAXED_CONSTEXPR void SetManualPasskmarkAngle(bool value); + constexpr void SetManualPasskmarkLength(bool value); + constexpr void SetManualPasskmarkWidth(bool value); + constexpr void SetManualPasskmarkAngle(bool value); - Q_DECL_RELAXED_CONSTEXPR void SetPasskmarkLength(qreal value); - Q_DECL_RELAXED_CONSTEXPR void SetPasskmarkWidth(qreal value); - Q_DECL_RELAXED_CONSTEXPR void SetPasskmarkAngle(qreal value); + constexpr void SetPasskmarkLength(qreal value); + constexpr void SetPasskmarkWidth(qreal value); + constexpr void SetPasskmarkAngle(qreal value); - Q_DECL_RELAXED_CONSTEXPR auto MaxLocalSA(qreal width) const -> qreal; - Q_DECL_RELAXED_CONSTEXPR auto PassmarkLength(qreal width) const -> qreal; + constexpr auto MaxLocalSA(qreal width) const -> qreal; + constexpr auto PassmarkLength(qreal width) const -> qreal; - Q_DECL_CONSTEXPR auto IsPassmarkClockwiseOpening() const -> bool; - Q_DECL_RELAXED_CONSTEXPR void SetPassmarkClockwiseOpening(bool clockwise); + constexpr auto IsPassmarkClockwiseOpening() const -> bool; + constexpr void SetPassmarkClockwiseOpening(bool clockwise); auto toJson() const -> QJsonObject; @@ -110,36 +110,36 @@ Q_DECLARE_METATYPE(VSAPoint) // NOLINT Q_DECLARE_TYPEINFO(VSAPoint, Q_MOVABLE_TYPE); // NOLINT //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VSAPoint::VSAPoint() noexcept // NOLINT(hicpp-use-equals-default) +constexpr inline VSAPoint::VSAPoint() noexcept // NOLINT(hicpp-use-equals-default) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VSAPoint::VSAPoint(qreal xpos, qreal ypos) +constexpr inline VSAPoint::VSAPoint(qreal xpos, qreal ypos) : VLayoutPoint(xpos, ypos) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VSAPoint::VSAPoint(QPointF p) +constexpr inline VSAPoint::VSAPoint(QPointF p) : VLayoutPoint(p) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline VSAPoint::VSAPoint(const VLayoutPoint &p) +constexpr inline VSAPoint::VSAPoint(const VLayoutPoint &p) : VLayoutPoint(p) { } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::GetSABefore() const -> qreal +constexpr inline auto VSAPoint::GetSABefore() const -> qreal { return m_before; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::GetSABefore(qreal width) const -> qreal +constexpr inline auto VSAPoint::GetSABefore(qreal width) const -> qreal { if (m_before < 0) { @@ -149,19 +149,19 @@ Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::GetSABefore(qreal width) const -> } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetSABefore(qreal value) +constexpr inline void VSAPoint::SetSABefore(qreal value) { value < 0 ? m_before = -1 : m_before = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::GetSAAfter() const -> qreal +constexpr inline auto VSAPoint::GetSAAfter() const -> qreal { return m_after; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::GetSAAfter(qreal width) const -> qreal +constexpr inline auto VSAPoint::GetSAAfter(qreal width) const -> qreal { if (m_after < 0) { @@ -171,103 +171,103 @@ Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::GetSAAfter(qreal width) const -> } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetSAAfter(qreal value) +constexpr inline void VSAPoint::SetSAAfter(qreal value) { value < 0 ? m_after = -1 : m_after = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::GetAngleType() const -> PieceNodeAngle +constexpr inline auto VSAPoint::GetAngleType() const -> PieceNodeAngle { return m_angle; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetAngleType(PieceNodeAngle value) +constexpr inline void VSAPoint::SetAngleType(PieceNodeAngle value) { m_angle = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::IsManualPasskmarkLength() const -> bool +constexpr inline auto VSAPoint::IsManualPasskmarkLength() const -> bool { return m_manualPassmarkLength; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::IsManualPasskmarkWidth() const -> bool +constexpr inline auto VSAPoint::IsManualPasskmarkWidth() const -> bool { return m_manualPassmarkWidth; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::IsManualPasskmarkAngle() const -> bool +constexpr inline auto VSAPoint::IsManualPasskmarkAngle() const -> bool { return m_manualPassmarkAngle; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetManualPasskmarkLength(bool value) +constexpr inline void VSAPoint::SetManualPasskmarkLength(bool value) { m_manualPassmarkLength = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetManualPasskmarkWidth(bool value) +constexpr inline void VSAPoint::SetManualPasskmarkWidth(bool value) { m_manualPassmarkWidth = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetManualPasskmarkAngle(bool value) +constexpr inline void VSAPoint::SetManualPasskmarkAngle(bool value) { m_manualPassmarkAngle = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::GetPasskmarkLength() const -> qreal +constexpr inline auto VSAPoint::GetPasskmarkLength() const -> qreal { return m_passmarkLength; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::GetPasskmarkWidth() const -> qreal +constexpr inline auto VSAPoint::GetPasskmarkWidth() const -> qreal { return m_passmarkWidth; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::GetPasskmarkAngle() const -> qreal +constexpr inline auto VSAPoint::GetPasskmarkAngle() const -> qreal { return m_passmarkAngle; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetPasskmarkLength(qreal value) +constexpr inline void VSAPoint::SetPasskmarkLength(qreal value) { m_passmarkLength = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetPasskmarkWidth(qreal value) +constexpr inline void VSAPoint::SetPasskmarkWidth(qreal value) { m_passmarkWidth = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetPasskmarkAngle(qreal value) +constexpr inline void VSAPoint::SetPasskmarkAngle(qreal value) { m_passmarkAngle = value; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::MaxLocalSA(qreal width) const -> qreal +constexpr inline auto VSAPoint::MaxLocalSA(qreal width) const -> qreal { return qMax(GetSAAfter(width), GetSABefore(width)); } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::PassmarkLength(qreal width) const -> qreal +constexpr inline auto VSAPoint::PassmarkLength(qreal width) const -> qreal { if (not m_manualPassmarkLength) { @@ -280,13 +280,13 @@ Q_DECL_RELAXED_CONSTEXPR inline auto VSAPoint::PassmarkLength(qreal width) const } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_CONSTEXPR inline auto VSAPoint::IsPassmarkClockwiseOpening() const -> bool +constexpr inline auto VSAPoint::IsPassmarkClockwiseOpening() const -> bool { return m_passmarkClockwiseOpening; } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline void VSAPoint::SetPassmarkClockwiseOpening(bool clockwise) +constexpr inline void VSAPoint::SetPassmarkClockwiseOpening(bool clockwise) { m_passmarkClockwiseOpening = clockwise; } diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index 66561f916..a0fca1c60 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -489,7 +489,7 @@ template constexpr inline auto InchToPixel(T val) noexcept -> T } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto ToPixel(double val, const Unit &unit) noexcept -> double +constexpr inline auto ToPixel(double val, const Unit &unit) noexcept -> double { switch (unit) { @@ -526,7 +526,7 @@ template constexpr inline auto PixelToCm(T pix) -> T } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto FromPixel(double pix, const Unit &unit) -> double +constexpr inline auto FromPixel(double pix, const Unit &unit) -> double { switch (unit) { @@ -565,7 +565,7 @@ template constexpr inline auto Cm2ToPixel2(T val) -> T } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto ToPixel2(double val, const Unit &unit) -> double +constexpr inline auto ToPixel2(double val, const Unit &unit) -> double { switch (unit) { @@ -604,7 +604,7 @@ template constexpr inline auto Pixel2ToCm2(T pix) -> T } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto FromPixel2(double pix, const Unit &unit) -> double +constexpr inline auto FromPixel2(double pix, const Unit &unit) -> double { switch (unit) { @@ -623,7 +623,7 @@ Q_DECL_RELAXED_CONSTEXPR inline auto FromPixel2(double pix, const Unit &unit) -> } //--------------------------------------------------------------------------------------------------------------------- -Q_DECL_RELAXED_CONSTEXPR inline auto UnitConvertor(qreal value, const Unit &from, const Unit &to) -> qreal +constexpr inline auto UnitConvertor(qreal value, const Unit &from, const Unit &to) -> qreal { switch (from) { @@ -698,7 +698,7 @@ Q_DECL_RELAXED_CONSTEXPR inline auto UnitConvertor(qreal value, const Unit &from * @brief UnitConvertor Converts the values of the given margin from given unit to the new unit. * returns a new instand of QMarginsF. */ -Q_DECL_RELAXED_CONSTEXPR inline auto UnitConvertor(const QMarginsF &margins, const Unit &from, const Unit &to) +constexpr inline auto UnitConvertor(const QMarginsF &margins, const Unit &from, const Unit &to) -> QMarginsF { const qreal left = UnitConvertor(margins.left(), from, to); @@ -725,8 +725,8 @@ Q_REQUIRED_RESULT auto darkenPixmap(const QPixmap &pixmap) -> QPixmap; void ShowInGraphicalShell(const QString &filePath); -Q_REQUIRED_RESULT Q_DECL_RELAXED_CONSTEXPR static inline auto VFuzzyComparePossibleNulls(double p1, double p2) -> bool; -Q_DECL_RELAXED_CONSTEXPR static inline auto VFuzzyComparePossibleNulls(double p1, double p2) -> bool +Q_REQUIRED_RESULT constexpr static inline auto VFuzzyComparePossibleNulls(double p1, double p2) -> bool; +constexpr static inline auto VFuzzyComparePossibleNulls(double p1, double p2) -> bool { if (qFuzzyIsNull(p1)) { diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index e267f9e62..f9765d075 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -70,7 +70,7 @@ using namespace Qt::Literals::StringLiterals; namespace { -Q_DECL_CONSTEXPR auto DAYS_TO_KEEP_LOGS = 3; +constexpr auto DAYS_TO_KEEP_LOGS = 3; auto FilterLocales(const QStringList &locales) -> QStringList { diff --git a/src/libs/vmisc/vmath.h b/src/libs/vmisc/vmath.h index b20e5cfa4..cc4b90b3e 100644 --- a/src/libs/vmisc/vmath.h +++ b/src/libs/vmisc/vmath.h @@ -51,7 +51,7 @@ #define M_EULER (0.57721566490153286060) #endif -template Q_DECL_CONSTEXPR inline auto vRound(T d, int p) -> T +template constexpr inline auto vRound(T d, int p) -> T { return p > 0 ? qRound(d * (p * 10.0)) / (p * 10.0) : qRound(d); } #endif // VMATH_H diff --git a/src/test/ValentinaTest/tst_vspline.cpp b/src/test/ValentinaTest/tst_vspline.cpp index 4da1ab3c8..e9cdc1e15 100644 --- a/src/test/ValentinaTest/tst_vspline.cpp +++ b/src/test/ValentinaTest/tst_vspline.cpp @@ -902,7 +902,7 @@ void TST_VSpline::TestCutSpline() VSpline spline1(spl.GetP1(), spl1p2, spl1p3, p); spline1.SetApproximationScale(0.5); - Q_DECL_RELAXED_CONSTEXPR qreal eps = ToPixel(0.0001, Unit::Mm); + constexpr qreal eps = ToPixel(0.0001, Unit::Mm); QVERIFY(UnitConvertor(spline1.GetLength(), Unit::Px, Unit::Cm) - result < eps); }