diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-29 16:57:12 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-29 16:57:27 +0100 |
commit | a1dbdcbd6e818118f5fc28cdd39e47a02380adbd (patch) | |
tree | 0d813d9d72baeb1b5f7be048e775896c73f134f5 /tests/auto/gui | |
parent | 67ea445f09db9feea4e863faa12c45fb007f53a4 (diff) | |
parent | 4cbadf699838406d14366ce61deec03cf45113f7 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
src/corelib/Qt5CoreConfigExtras.cmake.in
src/corelib/Qt5CoreMacros.cmake
src/dbus/Qt5DBusConfigExtras.cmake.in
src/widgets/Qt5WidgetsConfigExtras.cmake.in
Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
Diffstat (limited to 'tests/auto/gui')
20 files changed, 60 insertions, 29 deletions
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index bc964e0d5c..71aaa23da4 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -32,7 +32,7 @@ #include <qimage.h> #include <qimagereader.h> #include <qlist.h> -#include <qmatrix.h> +#include <qtransform.h> #include <qrandom.h> #include <stdio.h> @@ -1204,7 +1204,7 @@ void tst_QImage::rotate() // original.save("rotated90_original.png", "png"); // Initialize the matrix manually (do not use rotate) to avoid rounding errors - QMatrix matRotate90; + QTransform matRotate90; matRotate90.rotate(degrees); QImage dest = original; // And rotate it 4 times, then the image should be identical to the original @@ -1218,7 +1218,7 @@ void tst_QImage::rotate() // dest.save("rotated90_result.png","png"); QCOMPARE(original, dest); - // Test with QMatrix::rotate 90 also, since we trust that now + // Test with QTransform::rotate 90 also, since we trust that now matRotate90.rotate(degrees); dest = original; // And rotate it 4 times, then the image should be identical to the original diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index ba5df809f2..1d77f70919 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -32,7 +32,6 @@ #include <qbitmap.h> #include <qimage.h> #include <qimagereader.h> -#include <qmatrix.h> #ifndef QT_NO_WIDGETS #include <qdesktopwidget.h> #include <qsplashscreen.h> diff --git a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp index 2645bb111e..d60d6643b2 100644 --- a/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp +++ b/tests/auto/gui/kernel/qguimetatype/tst_qguimetatype.cpp @@ -197,9 +197,14 @@ template<> struct TestValueFactory<QMetaType::QTextLength> { template<> struct TestValueFactory<QMetaType::QTextFormat> { static QTextFormat *create() { return new QTextFormat(QTextFormat::FrameFormat); } }; +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED template<> struct TestValueFactory<QMetaType::QMatrix> { static QMatrix *create() { return new QMatrix(10, 20, 30, 40, 50, 60); } }; +QT_WARNING_POP +#endif template<> struct TestValueFactory<QMetaType::QTransform> { static QTransform *create() { return new QTransform(10, 20, 30, 40, 50, 60); } }; diff --git a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp index 0b9fc3c9ae..8b301c145a 100644 --- a/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp +++ b/tests/auto/gui/kernel/qguivariant/test/tst_qguivariant.cpp @@ -402,6 +402,9 @@ void tst_QGuiVariant::toString() QCOMPARE( str, result ); } +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED void tst_QGuiVariant::matrix() { QVariant variant; @@ -414,6 +417,8 @@ void tst_QGuiVariant::matrix() QVERIFY(mmatrix); QMetaType::destroy(QVariant::Matrix, mmatrix); } +QT_WARNING_POP +#endif void tst_QGuiVariant::matrix4x4() { diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST index 27463adf99..44a55316ab 100644 --- a/tests/auto/gui/kernel/qwindow/BLACKLIST +++ b/tests/auto/gui/kernel/qwindow/BLACKLIST @@ -2,10 +2,10 @@ opensuse-leap [positioning:default] linux -osx-10.12 ci +macos ci winrt [positioning:fake] -osx-10.12 ci +macos ci [modalWithChildWindow] # QTBUG-66851 # QTBUG-69160 diff --git a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp index e19f76d830..3c4f2f2e75 100644 --- a/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp +++ b/tests/auto/gui/math3d/qmatrixnxn/tst_qmatrixnxn.cpp @@ -3061,6 +3061,9 @@ void tst_QMatrixNxN::columnsAndRows() QVERIFY(m1.row(3) == QVector4D(4, 8, 12, 16)); } +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED // Test converting QMatrix objects into QMatrix4x4 and then // checking that transformations in the original perform the // equivalent transformations in the new matrix. @@ -3107,6 +3110,8 @@ void tst_QMatrixNxN::convertQMatrix() QVERIFY(qFuzzyCompare(float(m5.dx()), float(m7.dx()))); QVERIFY(qFuzzyCompare(float(m5.dy()), float(m7.dy()))); } +QT_WARNING_POP +#endif // Test converting QTransform objects into QMatrix4x4 and then // checking that transformations in the original perform the diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index e05de64be5..9eb62ceab2 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -1704,8 +1704,11 @@ void tst_QPainter::combinedMatrix() QTransform ct = p.combinedTransform(); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED QMatrix cm = p.combinedMatrix(); QCOMPARE(cm, ct.toAffine()); +QT_WARNING_POP #endif QPointF pt = QPointF(0, 0) * ct.toAffine(); @@ -2245,7 +2248,7 @@ void tst_QPainter::clippedPolygon() { QFETCH(QSize, imageSize); QFETCH(QPainterPath, path); - QPolygonF polygon = path.toFillPolygon(); + QPolygonF polygon = path.toFillPolygon(QTransform()); QFETCH(QRect, clipRect); QPainterPath clipPath; clipPath.addRect(clipRect); @@ -3066,7 +3069,7 @@ void tst_QPainter::fpe_steepSlopes_data() const qreal dsin = 0.000014946676875461832484392500630665523431162000633776187896728515625; const qreal dcos = 0.9999999998882984630910186751862056553363800048828125; - const QTransform transform = QTransform(QMatrix(dcos, dsin, -dsin, dcos, 64, 64)); + const QTransform transform = QTransform(dcos, dsin, -dsin, dcos, 64, 64); const QLineF line(2, 2, 2, 6); QTest::newRow("task 207147 aa") << transform << line << true; @@ -4064,7 +4067,7 @@ void tst_QPainter::drawPolygon() path.moveTo(2, 34); path.lineTo(34, 2); - QPolygonF poly = stroker.createStroke(path).toFillPolygon(); + QPolygonF poly = stroker.createStroke(path).toFillPolygon(QTransform()); img.fill(0xffffffff); QPainter p(&img); @@ -4133,7 +4136,10 @@ void tst_QPainter::inactivePainter() p.setClipping(true); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.combinedMatrix(); +QT_WARNING_POP #endif p.combinedTransform(); @@ -4142,7 +4148,10 @@ void tst_QPainter::inactivePainter() p.device(); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.deviceMatrix(); +QT_WARNING_POP #endif p.deviceTransform(); @@ -4168,7 +4177,10 @@ void tst_QPainter::inactivePainter() p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, false); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.resetMatrix(); +QT_WARNING_POP #endif p.resetTransform(); p.rotate(1); @@ -4186,8 +4198,11 @@ void tst_QPainter::inactivePainter() p.setWindow(QRect(10, 10, 620, 460)); #if QT_DEPRECATED_SINCE(5, 13) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED p.worldMatrix(); p.setWorldMatrix(QMatrix().translate(43, 21), true); +QT_WARNING_POP #endif p.setWorldMatrixEnabled(true); diff --git a/tests/auto/gui/painting/qpathclipper/paths.cpp b/tests/auto/gui/painting/qpathclipper/paths.cpp index 1328befd1b..a814958394 100644 --- a/tests/auto/gui/painting/qpathclipper/paths.cpp +++ b/tests/auto/gui/painting/qpathclipper/paths.cpp @@ -713,9 +713,5 @@ QPainterPath Paths::bezierQuadrant() path.closeSubpath(); } - QMatrix m(2, 0, - 0, 2, - 0, 0); - return path; } diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp index 93035af7d3..01853d841a 100644 --- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp +++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp @@ -152,9 +152,9 @@ void tst_QPathClipper::initTestCase() for (int i = 0; i < paths.size(); ++i) { QRectF bounds = paths[i].boundingRect(); - QMatrix m(1, 0, - 0, 1, - -bounds.center().x(), -bounds.center().y()); + QTransform m(1, 0, + 0, 1, + -bounds.center().x(), -bounds.center().y()); paths[i] = m.map(paths[i]); } diff --git a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp index f9366c9227..78638a7518 100644 --- a/tests/auto/gui/painting/qtransform/tst_qtransform.cpp +++ b/tests/auto/gui/painting/qtransform/tst_qtransform.cpp @@ -331,17 +331,13 @@ void tst_QTransform::mapToPolygon() void tst_QTransform::qhash() { - QMatrix m1; - m1.shear(3.0, 2.0); - m1.rotate(44); + QTransform t1; + t1.shear(3.0, 2.0); + t1.rotate(44); - QMatrix m2 = m1; - - QTransform t1(m1); - QTransform t2(m2); + QTransform t2 = t1; // not really much to test here, so just the bare minimum: - QCOMPARE(qHash(m1), qHash(m2)); QCOMPARE(qHash(t1), qHash(t2)); } @@ -376,6 +372,9 @@ void tst_QTransform::scale() QVERIFY( QTransform::fromScale( 1, 1 ) == QTransform()); } +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED void tst_QTransform::matrix() { QMatrix mat1; @@ -414,7 +413,7 @@ void tst_QTransform::matrix() QRect rect(43, 70, 200, 200); QPoint pt(43, 66); - QCOMPARE(tranInv.map(pt), matInv.map(pt)); + QCOMPARE(tranInv.mapRect(rect), matInv.mapRect(rect)); QCOMPARE(tranInv.map(pt), matInv.map(pt)); QPainterPath path; @@ -431,6 +430,8 @@ void tst_QTransform::testOffset() const QMatrix &aff = trans.toAffine(); QCOMPARE((void*)(&aff), (void*)(&trans)); } +QT_WARNING_POP +#endif void tst_QTransform::types() { diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp index da88a868f3..281639c27a 100644 --- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp +++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp @@ -32,6 +32,9 @@ #include <qmath.h> #include <qpolygon.h> +#if QT_DEPRECATED_SINCE(5, 15) +QT_WARNING_PUSH +QT_WARNING_DISABLE_DEPRECATED class tst_QWMatrix : public QObject { @@ -324,5 +327,8 @@ void tst_QWMatrix::mapPolygon() } } +QT_WARNING_POP +#endif + QTEST_APPLESS_MAIN(tst_QWMatrix) #include "tst_qwmatrix.moc" diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro index 722c99ee0b..604aa59d8a 100644 --- a/tests/auto/gui/qopengl/qopengl.pro +++ b/tests/auto/gui/qopengl/qopengl.pro @@ -4,7 +4,7 @@ CONFIG += testcase TARGET = tst_qopengl -QT += gui-private core-private testlib +QT += opengl gui-private core-private testlib SOURCES += tst_qopengl.cpp diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index ede1e58a53..3a7ad6dad5 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -26,15 +26,14 @@ ** ****************************************************************************/ - +#include <QtOpenGL/QOpenGLPaintDevice> +#include <QtOpenGL/QOpenGLTexture> #include <QtGui/private/qopenglcontext_p.h> #include <QtGui/QOpenGLFramebufferObject> #include <QtGui/QOpenGLFunctions> #include <QtGui/QOpenGLFunctions_4_2_Core> #include <QtGui/QOpenGLVertexArrayObject> #include <QtGui/QOpenGLBuffer> -#include <QtGui/QOpenGLPaintDevice> -#include <QtGui/QOpenGLTexture> #include <QtGui/QPainter> #include <QtGui/QScreen> #include <QtGui/QWindow> diff --git a/tests/auto/gui/rhi/qrhi/data/compile.bat b/tests/auto/gui/rhi/qrhi/data/buildshaders.bat index 5b8a77b833..5b8a77b833 100644 --- a/tests/auto/gui/rhi/qrhi/data/compile.bat +++ b/tests/auto/gui/rhi/qrhi/data/buildshaders.bat diff --git a/tests/auto/gui/rhi/qrhi/data/simple.frag.qsb b/tests/auto/gui/rhi/qrhi/data/simple.frag.qsb Binary files differindex 264b71ec0f..c235108d39 100644 --- a/tests/auto/gui/rhi/qrhi/data/simple.frag.qsb +++ b/tests/auto/gui/rhi/qrhi/data/simple.frag.qsb diff --git a/tests/auto/gui/rhi/qrhi/data/simple.vert.qsb b/tests/auto/gui/rhi/qrhi/data/simple.vert.qsb Binary files differindex 59080b60c6..68cfeb8f1d 100644 --- a/tests/auto/gui/rhi/qrhi/data/simple.vert.qsb +++ b/tests/auto/gui/rhi/qrhi/data/simple.vert.qsb diff --git a/tests/auto/gui/rhi/qrhi/data/simpletextured.frag.qsb b/tests/auto/gui/rhi/qrhi/data/simpletextured.frag.qsb Binary files differindex f302702aa9..397961c238 100644 --- a/tests/auto/gui/rhi/qrhi/data/simpletextured.frag.qsb +++ b/tests/auto/gui/rhi/qrhi/data/simpletextured.frag.qsb diff --git a/tests/auto/gui/rhi/qrhi/data/simpletextured.vert.qsb b/tests/auto/gui/rhi/qrhi/data/simpletextured.vert.qsb Binary files differindex e4f12bfb9e..a9067949a5 100644 --- a/tests/auto/gui/rhi/qrhi/data/simpletextured.vert.qsb +++ b/tests/auto/gui/rhi/qrhi/data/simpletextured.vert.qsb diff --git a/tests/auto/gui/rhi/qrhi/data/textured.frag.qsb b/tests/auto/gui/rhi/qrhi/data/textured.frag.qsb Binary files differindex 0a039137ec..018d732e2f 100644 --- a/tests/auto/gui/rhi/qrhi/data/textured.frag.qsb +++ b/tests/auto/gui/rhi/qrhi/data/textured.frag.qsb diff --git a/tests/auto/gui/rhi/qrhi/data/textured.vert.qsb b/tests/auto/gui/rhi/qrhi/data/textured.vert.qsb Binary files differindex 7853f77943..44454d226e 100644 --- a/tests/auto/gui/rhi/qrhi/data/textured.vert.qsb +++ b/tests/auto/gui/rhi/qrhi/data/textured.vert.qsb |