diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-06-05 14:07:05 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-07 07:26:05 +0200 |
commit | 7d7cd17d388e3777e1f707722638e69dcd477180 (patch) | |
tree | 06e7070e862c94321de235fc46aab3c255482081 /tests | |
parent | 51aff5ba67e048b7284995e4607c9f487e5866fb (diff) |
Make qtexttable autotest build without widgets
Change-Id: Id5f93dee0c4b5978c473838559f586ced35a2981
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/gui/text/qtexttable/qtexttable.pro | 3 | ||||
-rw-r--r-- | tests/auto/gui/text/qtexttable/tst_qtexttable.cpp | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/gui/text/qtexttable/qtexttable.pro b/tests/auto/gui/text/qtexttable/qtexttable.pro index d39704db01..4307849d22 100644 --- a/tests/auto/gui/text/qtexttable/qtexttable.pro +++ b/tests/auto/gui/text/qtexttable/qtexttable.pro @@ -1,7 +1,8 @@ CONFIG += testcase CONFIG += parallel_test TARGET = tst_qtexttable -QT += widgets testlib +QT += testlib +!contains(QT_CONFIG, no-widgets): QT += widgets SOURCES += tst_qtexttable.cpp diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp index 137b44a39a..89dbbd7e85 100644 --- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp +++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp @@ -49,7 +49,9 @@ #include <qdebug.h> #include <qtextcursor.h> #include <qtextdocument.h> +#ifndef QT_NO_WIDGETS #include <qtextedit.h> +#endif typedef QList<int> IntList; Q_DECLARE_METATYPE(IntList) @@ -98,8 +100,10 @@ private slots: void removeColumns4(); void removeColumns5(); void removeColumnsInTableWithMergedRows(); +#ifndef QT_NO_WIDGETS void QTBUG11282_insertBeforeMergedEnding_data(); void QTBUG11282_insertBeforeMergedEnding(); +#endif private: QTextTable *create2x2Table(); @@ -961,6 +965,7 @@ void tst_QTextTable::removeColumnsInTableWithMergedRows() QCOMPARE(table->columns(), 1); } +#ifndef QT_NO_WIDGETS void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding_data() { QTest::addColumn<int>("rows"); @@ -997,6 +1002,7 @@ void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding() QCOMPARE(table->columns(), columns + insert.at(1)); delete textEdit; } +#endif QTEST_MAIN(tst_QTextTable) #include "tst_qtexttable.moc" |