diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index 493a5392e..cae698e4c 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -51,6 +51,7 @@ #include #include #include +#include QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes") @@ -202,7 +203,11 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con vStdOut().flush(); vStdErr().flush(); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) (*qApp->LogFile()) << debugdate << endl; +#else + (*qApp->LogFile()) << debugdate << Qt::endl; +#endif } if (isGuiThread) diff --git a/src/libs/vdxf/vdxfengine.cpp b/src/libs/vdxf/vdxfengine.cpp index f023ea186..8e7139531 100644 --- a/src/libs/vdxf/vdxfengine.cpp +++ b/src/libs/vdxf/vdxfengine.cpp @@ -154,7 +154,7 @@ void VDxfEngine::updateState(const QPaintEngineState &state) if (flags & QPaintEngine::DirtyTransform) { - matrix = state.matrix(); // Save new matrix for moving paths + matrix = state.transform(); // Save new matrix for moving paths } } diff --git a/src/libs/vdxf/vdxfengine.h b/src/libs/vdxf/vdxfengine.h index de1e8d0bf..9a95b63b7 100644 --- a/src/libs/vdxf/vdxfengine.h +++ b/src/libs/vdxf/vdxfengine.h @@ -105,7 +105,7 @@ private: QString fileName; DRW::Version m_version; bool m_binary; - QMatrix matrix; + QTransform matrix; QSharedPointer input; VarMeasurement varMeasurement; VarInsunits varInsunits; diff --git a/src/libs/vmisc/qxtcsvmodel.cpp b/src/libs/vmisc/qxtcsvmodel.cpp index 7a1a01354..cf32fe4c0 100644 --- a/src/libs/vmisc/qxtcsvmodel.cpp +++ b/src/libs/vmisc/qxtcsvmodel.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include "../vmisc/diagnostic.h" @@ -615,7 +616,11 @@ bool QxtCsvModel::toCSV(QIODevice* dest, QString &error, bool withHeader, QChar } data += qxt_addCsvQuotes(d_ptr.quoteMode, d_ptr.header.at(col)); } +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) stream << data << endl; +#else + stream << data << Qt::endl; +#endif } for (row = 0; row < rows; ++row) { @@ -636,7 +641,11 @@ bool QxtCsvModel::toCSV(QIODevice* dest, QString &error, bool withHeader, QChar data += qxt_addCsvQuotes(d_ptr.quoteMode, QString()); } } +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) stream << data << endl; +#else + stream << data << Qt::endl; +#endif } stream << flush; dest->close(); diff --git a/src/libs/vobj/vobjengine.cpp b/src/libs/vobj/vobjengine.cpp index 843a5a0ae..cdc9fafbd 100644 --- a/src/libs/vobj/vobjengine.cpp +++ b/src/libs/vobj/vobjengine.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include "../vmisc/diagnostic.h" #include "../vmisc/vmath.h" @@ -125,8 +126,13 @@ bool VObjEngine::begin(QPaintDevice *pdev) } stream = QSharedPointer(new QTextStream(outputDevice.data())); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) *stream << "# Valentina OBJ File" << endl; *stream << "# valentinaproject.bitbucket.io/" << endl; +#else + *stream << "# Valentina OBJ File" << Qt::endl; + *stream << "# valentinaproject.bitbucket.io/" << Qt::endl; +#endif return true; } @@ -149,7 +155,7 @@ void VObjEngine::updateState(const QPaintEngineState &state) if (flags & QPaintEngine::DirtyTransform) { - matrix = state.matrix(); // Save new matrix for moving paths + matrix = state.transform(); // Save new matrix for moving paths } } @@ -166,7 +172,11 @@ void VObjEngine::drawPath(const QPainterPath &path) qint64 sq = Square(polygon); ++planeCount; +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) *stream << "o Plane." << QString("%1").arg(planeCount, 3, 10, QLatin1Char('0')) << endl; +#else + *stream << "o Plane." << QString("%1").arg(planeCount, 3, 10, QLatin1Char('0')) << Qt::endl; +#endif quint32 num_points = 0; @@ -221,7 +231,11 @@ void VObjEngine::drawPath(const QPainterPath &path) } delaunay2d_release(res);//Don't forget release data +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) *stream << "s off" << endl; +#else + *stream << "s off" << Qt::endl; +#endif } //--------------------------------------------------------------------------------------------------------------------- @@ -236,7 +250,11 @@ void VObjEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawM { *stream << QString(" %1").arg(static_cast(globalPointsCount) - pointCount + i + 1); } +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) *stream << endl; +#else + *stream << Qt::endl; +#endif } //--------------------------------------------------------------------------------------------------------------------- @@ -259,8 +277,13 @@ void VObjEngine::drawPoints(const QPointF *points, int pointCount) qreal x = ((points[i].x() - 0)/qFloor(size.width()/2.0)) - 1.0; qreal y = (((points[i].y() - 0)/qFloor(size.width()/2.0)) - 1.0)*-1; +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) *stream << "v" << " " << QString::number(x, 'f', 6 ) << " " << QString::number(y, 'f', 6 ) << " " << "0.000000" << endl; +#else + *stream << "v" << " " << QString::number(x, 'f', 6 ) << " " << QString::number(y, 'f', 6 ) << " " + << "0.000000" << Qt::endl; +#endif ++globalPointsCount; } } diff --git a/src/libs/vobj/vobjengine.h b/src/libs/vobj/vobjengine.h index 43c179166..d4cbad999 100644 --- a/src/libs/vobj/vobjengine.h +++ b/src/libs/vobj/vobjengine.h @@ -79,7 +79,7 @@ private: quint32 planeCount; QSize size; int resolution; - QMatrix matrix; + QTransform matrix; QPolygonF MakePointsUnique(const QPolygonF &polygon)const; qint64 Square(const QPolygonF &poly)const; diff --git a/src/test/ValentinaTest/tst_dxf.cpp b/src/test/ValentinaTest/tst_dxf.cpp index 9c79ba5f4..d171c3983 100644 --- a/src/test/ValentinaTest/tst_dxf.cpp +++ b/src/test/ValentinaTest/tst_dxf.cpp @@ -59,7 +59,11 @@ TST_DXF::TST_DXF(QObject *parent) void TST_DXF::initTestCase() { QTextStream ts(stdout); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) ts << QStringLiteral("Available codecs:\n%2.").arg(AvailableCodecs().join(", "))<< endl; +#else + ts << QStringLiteral("Available codecs:\n%2.").arg(AvailableCodecs().join(", "))<< Qt::endl; +#endif } //---------------------------------------------------------------------------------------------------------------------