From a9eb513019bd0a89be2ff3b2ad1c756798b19341 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 5 Jun 2012 14:04:49 +0200 Subject: [PATCH] Make qtextobject autotest build without widgets Change-Id: I9ea79b62d22faeccc07d8c21a0d8f032b40abef0 Reviewed-by: Lars Knoll --- tests/auto/gui/text/qtextobject/qtextobject.pro | 3 ++- tests/auto/gui/text/qtextobject/tst_qtextobject.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 #include #include +#ifndef QT_NO_WIDGETS #include +#endif #include 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 {