summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp')
-rw-r--r--tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
index 2bc611fe93..3da32a2842 100644
--- a/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
+++ b/tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp
@@ -1280,7 +1280,7 @@ void tst_QTextCursor::anchorInitialized1()
void tst_QTextCursor::anchorInitialized2()
{
cursor.insertBlock();
- cursor = QTextCursorPrivate::fromPosition(cursor.block().docHandle(), 1);
+ cursor = QTextCursorPrivate::fromPosition(const_cast<QTextDocumentPrivate *>(QTextDocumentPrivate::get(cursor.block())), 1);
QCOMPARE(cursor.position(), 1);
QCOMPARE(cursor.anchor(), 1);
QCOMPARE(cursor.selectionStart(), 1);