diff options
Diffstat (limited to 'tests/auto/gui/painting')
-rw-r--r-- | tests/auto/gui/painting/qcolor/tst_qcolor.cpp | 60 | ||||
-rw-r--r-- | tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 5 | ||||
-rw-r--r-- | tests/auto/gui/painting/qregion/tst_qregion.cpp | 24 |
3 files changed, 0 insertions, 89 deletions
diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp index 90a216e14a..c1c231089a 100644 --- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp +++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp @@ -111,10 +111,6 @@ private slots: void qcolorprofile_data(); void qcolorprofile(); - -#if 0 // Used to be included in Qt4 for Q_WS_X11 - void setallowX11ColorNames(); -#endif }; // Testing get/set functions @@ -1460,62 +1456,6 @@ void tst_QColor::achromaticHslHue() QCOMPARE(hsl.hslHue(), -1); } -#if 0 // Used to be included in Qt4 for Q_WS_X11 -void tst_QColor::setallowX11ColorNames() -{ - RGBData x11RgbTbl[] = { - // a few standard X11 color names - { "DodgerBlue1", qRgb(30, 144, 255) }, - { "DodgerBlue2", qRgb(28, 134, 238) }, - { "DodgerBlue3", qRgb(24, 116, 205) }, - { "DodgerBlue4", qRgb(16, 78, 139) }, - { "SteelBlue1", qRgb(99, 184, 255) }, - { "SteelBlue2", qRgb(92, 172, 238) }, - { "SteelBlue3", qRgb(79, 148, 205) }, - { "SteelBlue4", qRgb(54, 100, 139) }, - { "DeepSkyBlue1", qRgb(0, 191, 255) }, - { "DeepSkyBlue2", qRgb(0, 178, 238) }, - { "DeepSkyBlue3", qRgb(0, 154, 205) }, - { "DeepSkyBlue4", qRgb(0, 104, 139) }, - { "SkyBlue1", qRgb(135, 206, 255) }, - { "SkyBlue2", qRgb(126, 192, 238) }, - { "SkyBlue3", qRgb(108, 166, 205) }, - { "SkyBlue4", qRgb(74, 112, 139) } - }; - static const int x11RgbTblSize = sizeof(x11RgbTbl) / sizeof(RGBData); - - // X11 color names should not work by default - QVERIFY(!QColor::allowX11ColorNames()); - for (int i = 0; i < x11RgbTblSize; ++i) { - QString colorName = QLatin1String(x11RgbTbl[i].name); - QColor color; - color.setNamedColor(colorName); - QVERIFY(!color.isValid()); - } - - // enable X11 color names - QColor::setAllowX11ColorNames(true); - QVERIFY(QColor::allowX11ColorNames()); - for (int i = 0; i < x11RgbTblSize; ++i) { - QString colorName = QLatin1String(x11RgbTbl[i].name); - QColor color; - color.setNamedColor(colorName); - QColor expected(x11RgbTbl[i].value); - QCOMPARE(color, expected); - } - - // should be able to turn off X11 color names - QColor::setAllowX11ColorNames(false); - QVERIFY(!QColor::allowX11ColorNames()); - for (int i = 0; i < x11RgbTblSize; ++i) { - QString colorName = QLatin1String(x11RgbTbl[i].name); - QColor color; - color.setNamedColor(colorName); - QVERIFY(!color.isValid()); - } -} -#endif - void tst_QColor::premultiply() { // Tests that qPremultiply(qUnpremultiply(x)) returns x. diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 0efeb9b356..4cf23455e1 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -461,11 +461,6 @@ void tst_QPainter::drawPixmap_comp() destPm.fill(c1); srcPm.fill(c2); -#if 0 // Used to be included in Qt4 for Q_WS_X11 - if (!destPm.x11PictureHandle()) - QSKIP("Requires XRender support"); -#endif - QPainter p(&destPm); p.drawPixmap(0, 0, srcPm); p.end(); diff --git a/tests/auto/gui/painting/qregion/tst_qregion.cpp b/tests/auto/gui/painting/qregion/tst_qregion.cpp index 24c4583819..d1ea7706b9 100644 --- a/tests/auto/gui/painting/qregion/tst_qregion.cpp +++ b/tests/auto/gui/painting/qregion/tst_qregion.cpp @@ -33,9 +33,6 @@ #include <qbitmap.h> #include <qpainter.h> #include <qpolygon.h> -#if 0 // Used to be included in Qt4 for Q_WS_X11 -#include <private/qt_x11_p.h> -#endif class tst_QRegion : public QObject { @@ -79,9 +76,6 @@ private slots: void isEmpty_data(); void isEmpty(); -#if 0 /* Used to be included in Qt4 for Q_WS_X11 */ && defined(QT_BUILD_INTERNAL) - void clipRectangles(); -#endif void regionFromPath(); void scaleRegions_data(); @@ -910,24 +904,6 @@ void tst_QRegion::isEmpty() #endif } -#if 0 /* Used to be included in Qt4 for Q_WS_X11 */ && defined(QT_BUILD_INTERNAL) -void tst_QRegion::clipRectangles() -{ - QRegion region(30, 30, 30, 30); - int num = 0; - qt_getClipRects(region, num); - QCOMPARE(num, 1); - - region += QRegion(10, 10, 10, 10); - XRectangle *rects2 = static_cast<XRectangle *>(qt_getClipRects(region, num)); - QCOMPARE(num, 2); - - // Here's the important part (Y-sorted): - QCOMPARE(int(rects2[0].y), 10); - QCOMPARE(int(rects2[1].y), 30); -} -#endif - void tst_QRegion::regionFromPath() { { |