diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-02-19 11:26:57 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-03-04 08:28:04 +0100 |
commit | 4724dfff627f3cd3754f5d4a827c6b6790a89955 (patch) | |
tree | fcd6dec7ba40e6bc438ac2fd24772606fbab6b96 /tests/auto/gui/text/qtextcursor | |
parent | 5f1afeacf69c55495a51dc2cffbc6acf8f654239 (diff) |
Remove references to QTextDocumentPrivate from public API
The private object of QTextDocument has been exposed through
public APIs marked internal, which we should avoid as much as
possible, since it clutters the headers.
For accessing private data without adding friends, we have
a nice pattern of adding a static get() function to the
private class itself.
Fixes: QTBUG-55059
Change-Id: I03e949a677e03487e95f24e3608a06aa0a3511ab
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/gui/text/qtextcursor')
-rw-r--r-- | tests/auto/gui/text/qtextcursor/tst_qtextcursor.cpp | 2 |
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); |