summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-06-05 14:04:49 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-07 00:37:52 +0200
commita9eb513019bd0a89be2ff3b2ad1c756798b19341 (patch)
tree85c166e6dfbe3b697b34948adec74bb92aa80ec2 /tests
parent6aa09123df99f94111b60f3117bde992fbbe7dc4 (diff)
Make qtextobject autotest build without widgets
Change-Id: I9ea79b62d22faeccc07d8c21a0d8f032b40abef0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/text/qtextobject/qtextobject.pro3
-rw-r--r--tests/auto/gui/text/qtextobject/tst_qtextobject.cpp6
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/gui/text/qtextobject/qtextobject.pro b/tests/auto/gui/text/qtextobject/qtextobject.pro
index 46cf6cc1ae..59d0e51e42 100644
--- a/tests/auto/gui/text/qtextobject/qtextobject.pro
+++ b/tests/auto/gui/text/qtextobject/qtextobject.pro
@@ -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
diff --git a/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp b/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
index 7b6f155d7a..83bbb9f7ef 100644
--- a/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
+++ b/tests/auto/gui/text/qtextobject/tst_qtextobject.cpp
@@ -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
{