summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-02-19 11:26:57 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2020-03-04 08:28:04 +0100
commit4724dfff627f3cd3754f5d4a827c6b6790a89955 (patch)
treefcd6dec7ba40e6bc438ac2fd24772606fbab6b96 /src/widgets
parent5f1afeacf69c55495a51dc2cffbc6acf8f654239 (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 'src/widgets')
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp2
1 files changed, 1 insertions, 1 deletions
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();