summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextcursor
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-01 13:09:35 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-01 13:09:35 (GMT)
commit3f329793dbc8ffdf65d4ac2c46894ad46c3dfe07 (patch)
treef3018f0110b719bce5455f1f4ba45aed23f0d957 /tests/auto/qtextcursor
parent0b034e816994f3c6ad5ba5e0e9f7c0c60ab9440d (diff)
parentbbc96efe5f47353d3188728fc9024cfec5553709 (diff)
downloadQt-3f329793dbc8ffdf65d4ac2c46894ad46c3dfe07.zip
Qt-3f329793dbc8ffdf65d4ac2c46894ad46c3dfe07.tar.gz
Qt-3f329793dbc8ffdf65d4ac2c46894ad46c3dfe07.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Introduced getter and setter for the visual X cursor position. Defines whether the cursor should keep its current position.
Diffstat (limited to 'tests/auto/qtextcursor')
-rw-r--r--tests/auto/qtextcursor/tst_qtextcursor.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qtextcursor/tst_qtextcursor.cpp b/tests/auto/qtextcursor/tst_qtextcursor.cpp
index d44ce72..99babac 100644
--- a/tests/auto/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/qtextcursor/tst_qtextcursor.cpp
@@ -226,9 +226,9 @@ void tst_QTextCursor::navigation1()
cursor.movePosition(QTextCursor::End);
cursor.insertBlock();
{
- int oldPos = cursor.position();
- cursor.movePosition(QTextCursor::End);
- QVERIFY(cursor.position() == oldPos);
+ int oldPos = cursor.position();
+ cursor.movePosition(QTextCursor::End);
+ QVERIFY(cursor.position() == oldPos);
}
QVERIFY(cursor.atBlockStart());
QVERIFY(cursor.position() == 9);
@@ -1699,8 +1699,10 @@ void tst_QTextCursor::adjustCursorsOnInsert()
QCOMPARE(selection.position(), posAfter+1);
doc->undo();
+ selection.setKeepPositionOnInsert(true);
cursor.setPosition(posAfter);
cursor.insertText(QLatin1String("x"));
+ selection.setKeepPositionOnInsert(false);
QCOMPARE(selection.anchor(), posBefore);
QCOMPARE(selection.position(), posAfter);
doc->undo();