diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-06-05 13:28:16 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-07 00:38:41 +0200 |
commit | fe6fe39415aead498defc1bee01e760bb9295e21 (patch) | |
tree | 3317eb840bb439a1245476da3aef95fb9e36eeb9 | |
parent | c6d3942ea7ff7bbf4aee757d59dcac63b7a769fc (diff) |
Make qpixmap autotest build without widgets
Change-Id: Iabf1e6815a2af79d9da84c0e2bb9c2de52cb698f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r-- | tests/auto/gui/image/qpixmap/qpixmap.pro | 3 | ||||
-rw-r--r-- | tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/tests/auto/gui/image/qpixmap/qpixmap.pro b/tests/auto/gui/image/qpixmap/qpixmap.pro index 15098770c6..2ce6c6b9e7 100644 --- a/tests/auto/gui/image/qpixmap/qpixmap.pro +++ b/tests/auto/gui/image/qpixmap/qpixmap.pro @@ -1,7 +1,8 @@ CONFIG += testcase TARGET = tst_qpixmap -QT += core-private gui-private widgets widgets-private testlib +QT += core-private gui-private testlib +!contains(QT_CONFIG, no-widgets): QT += widgets widgets-private SOURCES += tst_qpixmap.cpp !wince* { diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index eeac564689..16fccb7491 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -46,9 +46,11 @@ #include <qimage.h> #include <qimagereader.h> #include <qmatrix.h> +#ifndef QT_NO_WIDGETS #include <qdesktopwidget.h> -#include <qpaintengine.h> #include <qsplashscreen.h> +#endif +#include <qpaintengine.h> #include <qpa/qplatformpixmap.h> #include <qpa/qplatformintegration.h> @@ -153,7 +155,9 @@ private slots: void fromImageReaderAnimatedGif(); void preserveDepth(); +#ifndef QT_NO_WIDGETS void splash_crash(); +#endif void toImageDeepCopy(); @@ -720,6 +724,7 @@ void tst_QPixmap::grabWindow() { // ### fixme: Check platforms QSKIP("QTBUG-20863 grabWindow is broken on most qpa backends"); +#ifndef QT_NO_WIDGETS #ifdef Q_OS_WINCE // We get out of memory, if the desktop itself is too big. if (QApplication::desktop()->width() <= 480) @@ -747,6 +752,7 @@ void tst_QPixmap::grabWindow() QPixmap grabWindowPixmap = QPixmap::grabWindow(child.winId()); QPixmap grabWidgetPixmap = QPixmap::grabWidget(&child); lenientCompare(grabWindowPixmap, grabWidgetPixmap); +#endif } void tst_QPixmap::isNull() @@ -1203,6 +1209,7 @@ void tst_QPixmap::fromImage_crash() delete img; } +#ifndef QT_NO_WIDGETS //This is testing QPlatformPixmap::createCompatiblePlatformPixmap - see QTBUG-5977 void tst_QPixmap::splash_crash() { @@ -1213,6 +1220,7 @@ void tst_QPixmap::splash_crash() QCoreApplication::processEvents(); splash.close(); } +#endif void tst_QPixmap::fromData() { |