summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-08-20 14:26:05 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-08-20 22:27:46 +0000
commitce73b4db62574fc966192e6a4f65b7e2b2280e38 (patch)
treed73af1000b0114f031ac4aee9f42fa44e740434f /tests/auto/gui/painting/qcolor/tst_qcolor.cpp
parent4dab6184f5f885bac21eef9e17a87219e64ba7dc (diff)
Remove dead code from Qt 4 times
The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/gui/painting/qcolor/tst_qcolor.cpp')
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp60
1 files changed, 0 insertions, 60 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.