summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/image/qpixmap/tst_qpixmap.cpp')
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index 98b8570b12..4be8a40547 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -65,10 +65,6 @@
#include <qscreen_qws.h>
#endif
-#ifdef Q_WS_X11
-#include <QX11Info>
-#endif
-
//TESTED_CLASS=
//TESTED_FILES=
@@ -180,10 +176,8 @@ static bool lenientCompare(const QPixmap &actual, const QPixmap &expected)
int size = actual.width() * actual.height();
int threshold = 2;
-#ifdef Q_WS_X11
- if (QX11Info::appDepth() == 16)
+ if (QPixmap::defaultDepth() == 16)
threshold = 10;
-#endif
QRgb *a = (QRgb *)actualImage.bits();
QRgb *e = (QRgb *)expectedImage.bits();
@@ -245,10 +239,8 @@ void tst_QPixmap::swap()
void tst_QPixmap::fromImage_data()
{
bool is16bit = false;
-#ifdef Q_WS_X11
- if (QX11Info::appDepth() == 16)
+ if (QPixmap::defaultDepth() == 16)
is16bit = true;
-#endif
QTest::addColumn<QImage::Format>("format");