From 6c136973fd9b82420c818668086abe93f534993d Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Fri, 5 Jul 2019 14:55:48 +0200 Subject: unblacklist passing tests These tests have not failed on the removed platforms for at least 60 days Task-number: QTBUG-76608 Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912 Reviewed-by: Volker Hilsheimer --- tests/auto/gui/text/qfont/BLACKLIST | 2 -- tests/auto/gui/text/qglyphrun/BLACKLIST | 1 - tests/auto/gui/text/qtextdocumentlayout/BLACKLIST | 4 +++- tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 tests/auto/gui/text/qfont/BLACKLIST (limited to 'tests/auto/gui/text') diff --git a/tests/auto/gui/text/qfont/BLACKLIST b/tests/auto/gui/text/qfont/BLACKLIST deleted file mode 100644 index 42cb8408f4..0000000000 --- a/tests/auto/gui/text/qfont/BLACKLIST +++ /dev/null @@ -1,2 +0,0 @@ -[defaultFamily] -b2qt diff --git a/tests/auto/gui/text/qglyphrun/BLACKLIST b/tests/auto/gui/text/qglyphrun/BLACKLIST index d8dbdabb4b..57f32c683d 100644 --- a/tests/auto/gui/text/qglyphrun/BLACKLIST +++ b/tests/auto/gui/text/qglyphrun/BLACKLIST @@ -1,4 +1,3 @@ [mixedScripts] ubuntu-18.04 b2qt -windows diff --git a/tests/auto/gui/text/qtextdocumentlayout/BLACKLIST b/tests/auto/gui/text/qtextdocumentlayout/BLACKLIST index b13b2497d3..5c81e74aa0 100644 --- a/tests/auto/gui/text/qtextdocumentlayout/BLACKLIST +++ b/tests/auto/gui/text/qtextdocumentlayout/BLACKLIST @@ -1,2 +1,4 @@ [imageAtRightAlignedTab] -linux +rhel-6.6 +rhel-7.4 +rhel-7.6 diff --git a/tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST b/tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST index fc9e5a9efe..0ce46130ce 100644 --- a/tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST +++ b/tests/auto/gui/text/qtextmarkdownwriter/BLACKLIST @@ -1,3 +1,2 @@ [rewriteDocument] -winrt # QTBUG-54623 - +winrt -- cgit v1.2.3 From 2f33e030b8c80b4665cc2c120df7833469c05145 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 10 Jul 2019 17:04:42 +0200 Subject: Remove usages of deprecated APIs of qtbase/gui - Replaced the usages of deprecated APIs by corresponding alternatives in the library code and documentation. - Modified the tests to make them build when deprecated APIs disabled: * Made the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, added tests for the replacement. Change-Id: Ic38245015377fc0c8127eb5458c184ffd4b450f1 Reviewed-by: Volker Hilsheimer --- tests/auto/gui/text/qfont/tst_qfont.cpp | 4 +++ tests/auto/gui/text/qtexttable/qtexttable.pro | 2 +- tests/auto/gui/text/qtexttable/tst_qtexttable.cpp | 42 +++++++++++++++++++++-- 3 files changed, 44 insertions(+), 4 deletions(-) (limited to 'tests/auto/gui/text') diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index 901284e131..96f3b1c1d7 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -58,7 +58,9 @@ private slots: void insertAndRemoveSubstitutions(); void serialize_data(); void serialize(); +#if QT_DEPRECATED_SINCE(5, 13) void lastResortFont(); +#endif void styleName(); void defaultFamily_data(); void defaultFamily(); @@ -484,6 +486,7 @@ void tst_QFont::serialize() } } +#if QT_DEPRECATED_SINCE(5, 13) // QFont::lastResortFont() may abort with qFatal() on QWS/QPA // if absolutely no font is found. Just as ducumented for QFont::lastResortFont(). // This happens on our CI machines which run QWS autotests. @@ -494,6 +497,7 @@ void tst_QFont::lastResortFont() QFont font; QVERIFY(!font.lastResortFont().isEmpty()); } +#endif void tst_QFont::styleName() { diff --git a/tests/auto/gui/text/qtexttable/qtexttable.pro b/tests/auto/gui/text/qtexttable/qtexttable.pro index 2faadfcb0d..73e94d5735 100644 --- a/tests/auto/gui/text/qtexttable/qtexttable.pro +++ b/tests/auto/gui/text/qtexttable/qtexttable.pro @@ -1,6 +1,6 @@ CONFIG += testcase TARGET = tst_qtexttable -QT += testlib +QT += testlib gui-private qtHaveModule(widgets): QT += widgets SOURCES += tst_qtexttable.cpp diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp index 22f00c677d..f21b969aa7 100644 --- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp +++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp @@ -44,6 +44,7 @@ #include #include #endif +#include typedef QList IntList; @@ -91,7 +92,7 @@ private slots: void QTBUG11282_insertBeforeMergedEnding(); #endif void QTBUG22011_insertBeforeRowSpan(); -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && defined(QT_BUILD_INTERNAL) void QTBUG31330_renderBackground(); #endif @@ -1025,7 +1026,7 @@ void tst_QTextTable::QTBUG22011_insertBeforeRowSpan() QCOMPARE(table->columns(), 6); } -#ifndef QT_NO_PRINTER +#if !defined(QT_NO_PRINTER) && defined(QT_BUILD_INTERNAL) namespace { class QTBUG31330_PaintDevice : public QPagedPaintDevice { @@ -1065,11 +1066,46 @@ public: {} }; + class QDummyPagedPaintDevicePrivate : public QPagedPaintDevicePrivate + { + bool setPageLayout(const QPageLayout &newPageLayout) override + { + m_pageLayout = newPageLayout; + return m_pageLayout.isEquivalentTo(newPageLayout); + } + + bool setPageSize(const QPageSize &pageSize) override + { + m_pageLayout.setPageSize(pageSize); + return m_pageLayout.pageSize().isEquivalentTo(pageSize); + } + + bool setPageOrientation(QPageLayout::Orientation orientation) override + { + m_pageLayout.setOrientation(orientation); + return m_pageLayout.orientation() == orientation; + } + + bool setPageMargins(const QMarginsF &margins, QPageLayout::Unit units) override + { + m_pageLayout.setUnits(units); + m_pageLayout.setMargins(margins); + return m_pageLayout.margins() == margins && m_pageLayout.units() == units; + } + + QPageLayout pageLayout() const override + { + return m_pageLayout; + } + + QPageLayout m_pageLayout; + }; + int pages; QPaintEngine* engine; QTBUG31330_PaintDevice(QPaintEngine* engine) - : pages(1), engine(engine) + : QPagedPaintDevice(new QDummyPagedPaintDevicePrivate), pages(1), engine(engine) { QPageLayout layout = pageLayout(); layout.setUnits(QPageLayout::Point); -- cgit v1.2.3