diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-06-21 12:38:44 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-06-21 14:22:00 +0200 |
commit | d848c3dfea3187b8248fc18a013624946cc84444 (patch) | |
tree | 312f9ce80ea169b1ab3689c9885bdbcb3869e0b4 | |
parent | cfd2cc91fdae40d8e1eddfc2f9ff2585a0b708e4 (diff) |
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 <timur.pocheptsov@qt.io>
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 22 |
1 files 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); |