From 4724dfff627f3cd3754f5d4a827c6b6790a89955 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 19 Feb 2020 11:26:57 +0100 Subject: 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 Reviewed-by: Simon Hausmann --- src/widgets/widgets/qplaintextedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp index 87e8af1382..d19e7e9ff9 100644 --- a/src/widgets/widgets/qplaintextedit.cpp +++ b/src/widgets/widgets/qplaintextedit.cpp @@ -1430,7 +1430,7 @@ QString QPlainTextEdit::anchorAt(const QPoint &pos) const if (cursorPos < 0) return QString(); - QTextDocumentPrivate *pieceTable = document()->docHandle(); + QTextDocumentPrivate *pieceTable = QTextDocumentPrivate::get(document()); QTextDocumentPrivate::FragmentIterator it = pieceTable->find(cursorPos); QTextCharFormat fmt = pieceTable->formatCollection()->charFormat(it->format); return fmt.anchorHref(); -- cgit v1.2.3