Fix compatibility with Qt 5.6.

This commit is contained in:
Roman Telezhynskyi 2024-01-13 08:33:22 +02:00
parent ea57284c1c
commit 97bc0266c2
2 changed files with 5 additions and 4 deletions

View File

@ -507,7 +507,7 @@ auto VFoldLine::TrueCenter(const QLineF &base, qreal width) const -> QPointF
if (VFuzzyComparePossibleNulls(base.length(), width) || qFuzzyIsNull(width)) if (VFuzzyComparePossibleNulls(base.length(), width) || qFuzzyIsNull(width))
{ {
return base.center(); return LineCenter(base);
} }
QLineF seg1 = base; QLineF seg1 = base;

View File

@ -1680,8 +1680,8 @@ auto VPiece::SeamAllowanceMirrorLine(const VContainer *data) const -> QLineF
QRectF rec = QRectF(0, 0, INT_MAX, INT_MAX); QRectF rec = QRectF(0, 0, INT_MAX, INT_MAX);
rec.translate(-INT_MAX / 2.0, -INT_MAX / 2.0); rec.translate(-INT_MAX / 2.0, -INT_MAX / 2.0);
QLineF axis = QLineF axis = QLineF(LineCenter(seamMirrorLine),
QLineF(seamMirrorLine.center(), VGObject::BuildRay(seamMirrorLine.center(), seamMirrorLine.angle() + 180, rec)); VGObject::BuildRay(LineCenter(seamMirrorLine), seamMirrorLine.angle() + 180, rec));
QVector<QPointF> points; QVector<QPointF> points;
CastTo(SeamAllowancePoints(data), points); CastTo(SeamAllowancePoints(data), points);
@ -1695,7 +1695,8 @@ auto VPiece::SeamAllowanceMirrorLine(const VContainer *data) const -> QLineF
const QPointF startPoint = intersections.constFirst(); const QPointF startPoint = intersections.constFirst();
std::reverse(points.begin(), points.end()); std::reverse(points.begin(), points.end());
axis = QLineF(seamMirrorLine.center(), VGObject::BuildRay(seamMirrorLine.center(), seamMirrorLine.angle(), rec)); axis =
QLineF(LineCenter(seamMirrorLine), VGObject::BuildRay(LineCenter(seamMirrorLine), seamMirrorLine.angle(), rec));
intersections = VAbstractCurve::CurveIntersectLine(points, axis); intersections = VAbstractCurve::CurveIntersectLine(points, axis);
if (intersections.isEmpty()) if (intersections.isEmpty())
{ {