summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtexttable/tst_qtexttable.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-08 01:42:25 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-08 01:42:25 (GMT)
commitf65a93476422627342404f33a755ae543047eaed (patch)
treebc8bf7ce4170b568ce606031dc4ededab5d221fc /tests/auto/qtexttable/tst_qtexttable.cpp
parent44277b86571d78f30f0d0393d01b11c672672ea2 (diff)
parentf91a2789c385af25310ac5f0463d5bb3311ec089 (diff)
downloadQt-f65a93476422627342404f33a755ae543047eaed.zip
Qt-f65a93476422627342404f33a755ae543047eaed.tar.gz
Qt-f65a93476422627342404f33a755ae543047eaed.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix crash when removing columns in merged row
Diffstat (limited to 'tests/auto/qtexttable/tst_qtexttable.cpp')
-rw-r--r--tests/auto/qtexttable/tst_qtexttable.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qtexttable/tst_qtexttable.cpp b/tests/auto/qtexttable/tst_qtexttable.cpp
index 2e6007e..c6ead5a 100644
--- a/tests/auto/qtexttable/tst_qtexttable.cpp
+++ b/tests/auto/qtexttable/tst_qtexttable.cpp
@@ -93,6 +93,7 @@ private slots:
void removeColumns3();
void removeColumns4();
void removeColumns5();
+ void removeColumnsInTableWithMergedRows();
private:
QTextTable *create2x2Table();
@@ -931,5 +932,18 @@ void tst_QTextTable::removeColumns5()
QCOMPARE(table->cellAt(3, 2).firstPosition(), 11);
}
+void tst_QTextTable::removeColumnsInTableWithMergedRows()
+{
+ QTextTable *table = cursor.insertTable(3, 4);
+ table->mergeCells(0, 0, 1, 4);
+ QCOMPARE(table->rows(), 3);
+ QCOMPARE(table->columns(), 4);
+
+ table->removeColumns(0, table->columns() - 1);
+
+ QCOMPARE(table->rows(), 3);
+ QCOMPARE(table->columns(), 1);
+}
+
QTEST_MAIN(tst_QTextTable)
#include "tst_qtexttable.moc"