summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-01 23:34:54 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-01 23:34:54 (GMT)
commit0fd09af3a05ac88c55fed73c85dc1c5aba68f057 (patch)
tree593ea0c942dfddef8d31b0088dd984fcdcb5756d /tests
parent6982c5e7f9d93d26ab5f241af0a5c6e80cd0e1ff (diff)
parent3f329793dbc8ffdf65d4ac2c46894ad46c3dfe07 (diff)
downloadQt-0fd09af3a05ac88c55fed73c85dc1c5aba68f057.zip
Qt-0fd09af3a05ac88c55fed73c85dc1c5aba68f057.tar.gz
Qt-0fd09af3a05ac88c55fed73c85dc1c5aba68f057.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')
-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();