diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-06-05 13:34:17 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-07 00:38:38 +0200 |
commit | c6d3942ea7ff7bbf4aee757d59dcac63b7a769fc (patch) | |
tree | c107433ff5bf13eff6bceb9d659824c4d9488faa /tests/auto/gui/image/qpicture | |
parent | 17e233e7c3bbd13f455f9299d1b714da436d0806 (diff) |
Make qpicture autotest build without widgets
Change-Id: Id2047dace7b3087f1c7b83545f5e122ab936d33c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/gui/image/qpicture')
-rw-r--r-- | tests/auto/gui/image/qpicture/qpicture.pro | 3 | ||||
-rw-r--r-- | tests/auto/gui/image/qpicture/tst_qpicture.cpp | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/gui/image/qpicture/qpicture.pro b/tests/auto/gui/image/qpicture/qpicture.pro index 13f0212811..27b8fd3e3e 100644 --- a/tests/auto/gui/image/qpicture/qpicture.pro +++ b/tests/auto/gui/image/qpicture/qpicture.pro @@ -1,7 +1,8 @@ CONFIG += testcase CONFIG += parallel_test TARGET = tst_qpicture -QT += widgets testlib +QT += testlib +!contains(QT_CONFIG, no-widgets): QT += widgets SOURCES += tst_qpicture.cpp diff --git a/tests/auto/gui/image/qpicture/tst_qpicture.cpp b/tests/auto/gui/image/qpicture/tst_qpicture.cpp index 8c2db9bed7..bd377d981e 100644 --- a/tests/auto/gui/image/qpicture/tst_qpicture.cpp +++ b/tests/auto/gui/image/qpicture/tst_qpicture.cpp @@ -45,8 +45,10 @@ #include <qpicture.h> #include <qpainter.h> #include <qimage.h> +#ifndef QT_NO_WIDGETS #include <qdesktopwidget.h> #include <qapplication.h> +#endif #include <limits.h> class tst_QPicture : public QObject @@ -64,7 +66,9 @@ private slots: void swap(); void operator_lt_lt(); +#ifndef QT_NO_WIDGETS void save_restore(); +#endif void boundaryValues_data(); void boundaryValues(); @@ -195,6 +199,7 @@ void tst_QPicture::operator_lt_lt() } } +#ifndef QT_NO_WIDGETS static QPointF scalePoint(const QPointF &point, QPaintDevice *sourceDevice, QPaintDevice *destDevice) { return QPointF(point.x() * qreal(destDevice->logicalDpiX()) / qreal(sourceDevice->logicalDpiX()), @@ -247,6 +252,7 @@ void tst_QPicture::save_restore() QVERIFY( pix1.toImage() == pix2.toImage() ); } +#endif void tst_QPicture::boundaryValues_data() { |