summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
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
{