summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorIain <qt-info@nokia.com>2009-05-11 17:36:46 (GMT)
committerIain <qt-info@nokia.com>2009-05-11 17:36:46 (GMT)
commitdabd8caa4a2faffefbc7f9bb4f233283458c779e (patch)
tree7747d8bd4e26e357449dd2e0e9dca4c2d1e4575e /src/gui/kernel/qapplication_s60.cpp
parent565f2957fb049f2df0330fac72ec5335860b9c7f (diff)
downloadQt-dabd8caa4a2faffefbc7f9bb4f233283458c779e.zip
Qt-dabd8caa4a2faffefbc7f9bb4f233283458c779e.tar.gz
Qt-dabd8caa4a2faffefbc7f9bb4f233283458c779e.tar.bz2
A better way of getting the screen's colour depth
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index ea0c3a6..72c2855 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -693,27 +693,8 @@ void qt_init(QApplicationPrivate *priv, int)
S60->updateScreenSize();
- TDisplayMode mode = S60->screenDevice()->DisplayMode(); ;
- switch(mode) {
- case EColor256:
- S60->screenDepth = 8;
- break;
- case EColor4K:
- S60->screenDepth = 12;
- break;
- case EColor64K:
- S60->screenDepth = 16;
- break;
- case EColor16M:
- case EColor16MU:
- case EColor16MA:
- S60->screenDepth = 32;
- break;
- default:
- qFatal("Unsupported screen depth");
- break;
- }
-
+ TDisplayMode mode = S60->screenDevice()->DisplayMode();
+ S60->screenDepth = TDisplayModeUtils::NumDisplayModeBitsPerPixel(mode);
RProcess me;
TSecureId securId = me.SecureId();