Make qtexttable autotest build without widgets
Change-Id: Id5f93dee0c4b5978c473838559f586ced35a2981 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
51aff5ba67
commit
7d7cd17d38
@ -1,7 +1,8 @@
|
|||||||
CONFIG += testcase
|
CONFIG += testcase
|
||||||
CONFIG += parallel_test
|
CONFIG += parallel_test
|
||||||
TARGET = tst_qtexttable
|
TARGET = tst_qtexttable
|
||||||
QT += widgets testlib
|
QT += testlib
|
||||||
|
!contains(QT_CONFIG, no-widgets): QT += widgets
|
||||||
SOURCES += tst_qtexttable.cpp
|
SOURCES += tst_qtexttable.cpp
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,7 +49,9 @@
|
|||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
#include <qtextcursor.h>
|
#include <qtextcursor.h>
|
||||||
#include <qtextdocument.h>
|
#include <qtextdocument.h>
|
||||||
|
#ifndef QT_NO_WIDGETS
|
||||||
#include <qtextedit.h>
|
#include <qtextedit.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef QList<int> IntList;
|
typedef QList<int> IntList;
|
||||||
Q_DECLARE_METATYPE(IntList)
|
Q_DECLARE_METATYPE(IntList)
|
||||||
@ -98,8 +100,10 @@ private slots:
|
|||||||
void removeColumns4();
|
void removeColumns4();
|
||||||
void removeColumns5();
|
void removeColumns5();
|
||||||
void removeColumnsInTableWithMergedRows();
|
void removeColumnsInTableWithMergedRows();
|
||||||
|
#ifndef QT_NO_WIDGETS
|
||||||
void QTBUG11282_insertBeforeMergedEnding_data();
|
void QTBUG11282_insertBeforeMergedEnding_data();
|
||||||
void QTBUG11282_insertBeforeMergedEnding();
|
void QTBUG11282_insertBeforeMergedEnding();
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QTextTable *create2x2Table();
|
QTextTable *create2x2Table();
|
||||||
@ -961,6 +965,7 @@ void tst_QTextTable::removeColumnsInTableWithMergedRows()
|
|||||||
QCOMPARE(table->columns(), 1);
|
QCOMPARE(table->columns(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_WIDGETS
|
||||||
void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding_data()
|
void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<int>("rows");
|
QTest::addColumn<int>("rows");
|
||||||
@ -997,6 +1002,7 @@ void tst_QTextTable::QTBUG11282_insertBeforeMergedEnding()
|
|||||||
QCOMPARE(table->columns(), columns + insert.at(1));
|
QCOMPARE(table->columns(), columns + insert.at(1));
|
||||||
delete textEdit;
|
delete textEdit;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QTEST_MAIN(tst_QTextTable)
|
QTEST_MAIN(tst_QTextTable)
|
||||||
#include "tst_qtexttable.moc"
|
#include "tst_qtexttable.moc"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user