summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2010-11-02 13:46:02 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-11-02 13:46:02 (GMT)
commitb375f4c0fd88c92e76c265198e55c7698c07a505 (patch)
tree80b9fd150c8e6bc489fff8b2fd0e647ea9a625a4 /tests/auto
parent72b5609eb62125dcf9e5c83edb4dc743a255e964 (diff)
downloadQt-b375f4c0fd88c92e76c265198e55c7698c07a505.zip
Qt-b375f4c0fd88c92e76c265198e55c7698c07a505.tar.gz
Qt-b375f4c0fd88c92e76c265198e55c7698c07a505.tar.bz2
Small cleanup of platformquirks header
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/platformquirks.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/auto/platformquirks.h b/tests/auto/platformquirks.h
index cdfe793..06d23d7 100644
--- a/tests/auto/platformquirks.h
+++ b/tests/auto/platformquirks.h
@@ -54,12 +54,13 @@
struct PlatformQuirks
{
- enum MediaFileTypes {
- mp3,
- wav,
- ogg
+ enum MediaFileTypes
+ {
+ mp3,
+ wav,
+ ogg
};
-
+
/* On some platforms, libpng or libjpeg sacrifice precision for speed.
Esp. with NEON support, color values after decoding can be off by up
to three bytes.
@@ -68,12 +69,12 @@ struct PlatformQuirks
{
#ifdef Q_WS_MAEMO_5
return true;
-#endif
-#ifdef Q_WS_X11
- if (X11->desktopEnvironment == DE_MAEMO6)
- return true;
-#endif
+#elif defined(Q_WS_X11)
+ // ### this is a very bad assumption, we should really check the version of libjpeg
+ return X11->desktopEnvironment == DE_MEEGO_COMPOSITOR;
+#else
return false;
+#endif
}
/* Some windowing systems automatically maximize apps on startup (e.g. Maemo)
@@ -83,26 +84,24 @@ struct PlatformQuirks
{
#ifdef Q_WS_MAEMO_5
return true;
-#endif
-#ifdef Q_WS_X11
- if (X11->desktopEnvironment == DE_MAEMO6)
- return true;
-#endif
+#elif defined(Q_WS_X11)
+ return X11->desktopEnvironment == DE_MEEGO_COMPOSITOR;
+#else
return false;
+#endif
}
static inline bool haveMouseCursor()
{
#ifdef Q_WS_MAEMO_5
return false;
-#endif
-#ifdef Q_WS_X11
- if (X11->desktopEnvironment == DE_MAEMO6)
- return false;
-#endif
+#elif defined(Q_WS_X11)
+ return X11->desktopEnvironment != DE_MEEGO_COMPOSITOR;
+#else
return true;
+#endif
}
-
+
/* On some systems an ogg codec is not installed by default.
The autotests have to know which fileType is the default on the system*/
static inline MediaFileTypes defaultMediaFileType()
@@ -111,7 +110,8 @@ struct PlatformQuirks
return PlatformQuirks::mp3;
#endif
#ifdef Q_WS_X11
- if (X11->desktopEnvironment == DE_MAEMO6)
+ // ### very bad assumption
+ if (X11->desktopEnvironment == DE_MEEGO_COMPOSITOR)
return PlatformQuirks::mp3;
#endif
return PlatformQuirks::ogg;