From c47193540b6ead50719fccf4f61585b4c0b853ea Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 17 Oct 2018 18:11:32 +0300 Subject: [PATCH] Improve precision of dump functions. It should be close to what debugger gives. (grafted from d94873822ea085f90db8ad6b857dd041cd9654c6) --HG-- branch : develop --- src/libs/vlayout/vabstractpiece.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp index 92b99fc09..b137a4bb0 100644 --- a/src/libs/vlayout/vabstractpiece.cpp +++ b/src/libs/vlayout/vabstractpiece.cpp @@ -619,7 +619,7 @@ void DumpVector(const QVector &points) for(auto point : points) { - out << QString("points += QPointF(%1, %2);").arg(point.x()).arg(point.y()) << endl; + out << QString("points += QPointF(%1, %2);").arg(point.x(), 0, 'f', 15).arg(point.y(), 0, 'f', 15) << endl; } out << endl << "return points;"; @@ -653,7 +653,8 @@ void DumpVector(const QVector &points) out << endl; } type = Default; - out << QString("points += VSAPoint(%1, %2);").arg(point.x()).arg(point.y()) << endl; + out << QString("points += VSAPoint(%1, %2);").arg(point.x(), 0, 'f', 15).arg(point.y(), 0, 'f', 15) + << endl; } else { @@ -665,7 +666,7 @@ void DumpVector(const QVector &points) out << "VSAPoint "; firstPoint = false; } - out << QString("p = VSAPoint(%1, %2);").arg(point.x()).arg(point.y()) << endl; + out << QString("p = VSAPoint(%1, %2);").arg(point.x(), 0, 'f', 15).arg(point.y(), 0, 'f', 15) << endl; if (not VFuzzyComparePossibleNulls(point.GetSABefore(), -1)) {