Make qtextobject autotest build without widgets

Change-Id: I9ea79b62d22faeccc07d8c21a0d8f032b40abef0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Kent Hansen 2012-06-05 14:04:49 +02:00 committed by Qt by Nokia
parent 6aa09123df
commit a9eb513019
2 changed files with 8 additions and 1 deletions

View File

@ -5,7 +5,8 @@
CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qtextobject
QT += widgets testlib
QT += testlib
!contains(QT_CONFIG, no-widgets): QT += widgets
SOURCES += tst_qtextobject.cpp

View File

@ -46,7 +46,9 @@
#include <qdebug.h>
#include <qtextobject.h>
#include <qtextdocument.h>
#ifndef QT_NO_WIDGETS
#include <qtextedit.h>
#endif
#include <qtextcursor.h>
class tst_QTextObject : public QObject
@ -58,7 +60,9 @@ public:
virtual ~tst_QTextObject();
private slots:
#ifndef QT_NO_WIDGETS
void getSetCheck();
#endif
void testStandAloneTextObject();
};
@ -70,6 +74,7 @@ tst_QTextObject::~tst_QTextObject()
{
}
#ifndef QT_NO_WIDGETS
// Testing get/set functions
void tst_QTextObject::getSetCheck()
{
@ -102,6 +107,7 @@ void tst_QTextObject::getSetCheck()
obj2.setUserState(INT_MAX);
QCOMPARE(INT_MAX, obj2.userState());
}
#endif
class TestTextObject : public QTextObject
{