Make qpicture autotest build without widgets

Change-Id: Id2047dace7b3087f1c7b83545f5e122ab936d33c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Kent Hansen 2012-06-05 13:34:17 +02:00 committed by Qt by Nokia
parent 17e233e7c3
commit c6d3942ea7
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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()
{