From d848c3dfea3187b8248fc18a013624946cc84444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 21 Jun 2019 12:38:44 +0200 Subject: Remove dead code from QApplicationPrivate::setSystemPalette The code was added in 2005, ifdefed out already, and never used. Change-Id: Ic5d070dd031665a4429739278851b50646694bf9 Reviewed-by: Timur Pocheptsov --- src/widgets/kernel/qapplication.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index c3e10063e1..6dd0aa2e86 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1463,28 +1463,10 @@ void QApplication::setPalette(const QPalette &palette, const char* className) void QApplicationPrivate::setSystemPalette(const QPalette &pal) { - QPalette adjusted; - -#if 0 - // adjust the system palette to avoid dithering - QColormap cmap = QColormap::instance(); - if (cmap.depths() > 4 && cmap.depths() < 24) { - for (int g = 0; g < QPalette::NColorGroups; g++) - for (int i = 0; i < QPalette::NColorRoles; i++) { - QColor color = pal.color((QPalette::ColorGroup)g, (QPalette::ColorRole)i); - color = cmap.colorAt(cmap.pixel(color)); - adjusted.setColor((QPalette::ColorGroup)g, (QPalette::ColorRole) i, color); - } - } -#else - adjusted = pal; -#endif - if (!sys_pal) - sys_pal = new QPalette(adjusted); + sys_pal = new QPalette(pal); else - *sys_pal = adjusted; - + *sys_pal = pal; if (!QApplicationPrivate::set_pal) QApplication::setPalette(*sys_pal); -- cgit v1.2.3