summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicseffect
diff options
context:
space:
mode:
authorAriya Hidayat <ariya.hidayat@nokia.com>2009-09-15 12:14:03 +0200
committerAriya Hidayat <ariya.hidayat@nokia.com>2009-09-15 14:27:57 +0200
commitd9597782202b2be117874330ceee95040c7365cb (patch)
treedc30179ad0b4d4bb96811be6b6c6d6ed6e51d32a /tests/auto/qgraphicseffect
parentafb6c4935dc6a7be0f9de092003477692559815c (diff)
Don't do pixel tests in QGraphicsEffect on other than 32-bit display.
Reviewed-by: Paul Olav Tvete
Diffstat (limited to 'tests/auto/qgraphicseffect')
-rw-r--r--tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
index d5205cd0d0..ba3783be7a 100644
--- a/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
+++ b/tests/auto/qgraphicseffect/tst_qgraphicseffect.cpp
@@ -41,6 +41,7 @@
#include <QtTest/QtTest>
+#include <QtGui/qdesktopwidget.h>
#include <QtGui/qgraphicseffect.h>
#include <QtGui/qgraphicsview.h>
#include <QtGui/qgraphicsscene.h>
@@ -369,6 +370,11 @@ void tst_QGraphicsEffect::opacity()
void tst_QGraphicsEffect::grayscale()
{
+ if (qApp->desktop()->depth() < 24) {
+ QSKIP("Test only works on 32 bit displays", SkipAll);
+ return;
+ }
+
QGraphicsScene scene(0, 0, 100, 100);
QGraphicsRectItem *item = scene.addRect(0, 0, 50, 50);
@@ -412,6 +418,11 @@ void tst_QGraphicsEffect::grayscale()
void tst_QGraphicsEffect::colorize()
{
+ if (qApp->desktop()->depth() < 24) {
+ QSKIP("Test only works on 32 bit displays", SkipAll);
+ return;
+ }
+
QGraphicsScene scene(0, 0, 100, 100);
QGraphicsRectItem *item = scene.addRect(0, 0, 50, 50);