diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-11 10:58:18 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-11 10:58:18 (GMT) |
commit | 935d4fc9504af2696f7d91b2074290b02f811da8 (patch) | |
tree | ad8450d4f06309ea789ef8173b91270504a1ea57 /tests | |
parent | d9c84c26dc212b2f170dfb48346df7c439e6f759 (diff) | |
parent | b033bb91ea6fd32989cc59904aa79db9a188bf5b (diff) | |
download | Qt-935d4fc9504af2696f7d91b2074290b02f811da8.zip Qt-935d4fc9504af2696f7d91b2074290b02f811da8.tar.gz Qt-935d4fc9504af2696f7d91b2074290b02f811da8.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Make sure removed QTextBlock is invalid
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtextblock/tst_qtextblock.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qtextblock/tst_qtextblock.cpp b/tests/auto/qtextblock/tst_qtextblock.cpp index cec3a6a..748d921 100644 --- a/tests/auto/qtextblock/tst_qtextblock.cpp +++ b/tests/auto/qtextblock/tst_qtextblock.cpp @@ -76,6 +76,7 @@ private slots: void excludeParagraphSeparatorFragment(); void backwardsBlockIterator(); void previousBlock_qtbug18026(); + void removedBlock_qtbug18500(); private: QTextDocument *doc; @@ -181,5 +182,16 @@ void tst_QTextBlock::previousBlock_qtbug18026() QVERIFY(last.isValid()); } +void tst_QTextBlock::removedBlock_qtbug18500() +{ + cursor.insertText("line 1\nline 2\nline 3 \nline 4\n"); + cursor.setPosition(7); + QTextBlock block = cursor.block(); + cursor.setPosition(21, QTextCursor::KeepAnchor); + + cursor.removeSelectedText(); + QVERIFY(!block.isValid()); +} + QTEST_MAIN(tst_QTextBlock) #include "tst_qtextblock.moc" |