summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-05-05 21:23:44 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-05-06 09:54:17 +0200
commit660b38bb2c4a7650ed04dc0f2feb2bf93d4e6739 (patch)
treea55842c2d648151560354a0fccd45efbfeddb681 /tests/auto/gui
parentd39fefc0ebc8481dd695be031d9479a6ee397612 (diff)
Remove a bunch of deprecated members from src/gui/painting classes
Also remove dead code that isn't compiled anymore in Qt 6 builds. Change-Id: I7a7ae35e61fb2ad9cc21180fb7224357ade1505f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 75ab0810ca..b593c357dd 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -124,10 +124,6 @@ private slots:
void drawPath2();
void drawPath3();
-#if QT_DEPRECATED_SINCE(5, 13)
- void drawRoundRect_data() { fillData(); }
- void drawRoundRect();
-#endif
void drawRoundedRect_data() { fillData(); }
void drawRoundedRect();
@@ -135,10 +131,6 @@ private slots:
void qimageFormats();
void textOnTransparentImage();
-#if !defined(QT_NO_WIDGETS) && QT_DEPRECATED_SINCE(5, 13)
- void initFrom();
-#endif
-
void setWindow();
void combinedTransform();
@@ -680,33 +672,6 @@ static QRect getPaintedSize(const QPixmap &pm, const QColor &background)
#ifndef QT_NO_WIDGETS
-#if QT_DEPRECATED_SINCE(5, 13)
-void tst_QPainter::initFrom()
-{
- QWidget *widget = new QWidget();
- QPalette pal = widget->palette();
- pal.setColor(QPalette::WindowText, QColor(255, 0, 0));
- pal.setBrush(QPalette::Window, QColor(0, 255, 0));
- widget->setPalette(pal);
- widget->show();
-
- QFont font = widget->font();
- font.setPointSize(26);
- font.setItalic(true);
- widget->setFont(font);
-
- QPixmap pm(100, 100);
- QPainter p(&pm);
- p.initFrom(widget);
-
- QCOMPARE(p.font(), font);
- QCOMPARE(p.pen().color(), pal.color(QPalette::WindowText));
- QCOMPARE(p.background(), pal.window());
-
- delete widget;
-}
-#endif
-
void tst_QPainter::drawBorderPixmap()
{
QPixmap src(79,79);
@@ -1549,43 +1514,6 @@ void tst_QPainter::drawClippedEllipse()
}
-#if QT_DEPRECATED_SINCE(5, 13)
-void tst_QPainter::drawRoundRect()
-{
- QFETCH(QRect, rect);
- QFETCH(bool, usePen);
-
-#ifdef Q_OS_MAC
- if (QTest::currentDataTag() == QByteArray("rect(6, 12, 3, 14) with pen") ||
- QTest::currentDataTag() == QByteArray("rect(6, 17, 3, 25) with pen") ||
- QTest::currentDataTag() == QByteArray("rect(10, 6, 10, 3) with pen") ||
- QTest::currentDataTag() == QByteArray("rect(10, 12, 10, 14) with pen") ||
- QTest::currentDataTag() == QByteArray("rect(13, 45, 17, 80) with pen") ||
- QTest::currentDataTag() == QByteArray("rect(13, 50, 17, 91) with pen") ||
- QTest::currentDataTag() == QByteArray("rect(17, 6, 24, 3) with pen") ||
- QTest::currentDataTag() == QByteArray("rect(24, 12, 38, 14) with pen"))
- QSKIP("The Mac paint engine is off-by-one on certain rect sizes");
-#endif
- QPixmap pixmap(rect.x() + rect.width() + 10,
- rect.y() + rect.height() + 10);
- {
- pixmap.fill(Qt::white);
- QPainter p(&pixmap);
- p.setRenderHint(QPainter::Qt4CompatiblePainting);
- p.setPen(usePen ? QPen(Qt::black) : QPen(Qt::NoPen));
- p.setBrush(Qt::black);
- p.drawRoundRect(rect);
- p.end();
-
- int increment = usePen ? 1 : 0;
-
- const QRect painted = getPaintedSize(pixmap, Qt::white);
- QCOMPARE(painted.width(), rect.width() + increment);
- QCOMPARE(painted.height(), rect.height() + increment);
- }
-}
-#endif
-
void tst_QPainter::drawRoundedRect()
{
QFETCH(QRect, rect);