summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextlayout.cpp
diff options
context:
space:
mode:
authorJonas Karlsson <jonas.karlsson@qt.io>2020-08-21 13:01:43 +0200
committerJonas Karlsson <jonas.karlsson@qt.io>2020-08-28 07:27:27 +0200
commit174154bcac2780cb704011662f2e9c1233fec933 (patch)
treea93dff334e4b2f47d12662b1967af0a8307c40b9 /src/gui/text/qtextlayout.cpp
parent3558704ed5c3d2c6dc6d024dfa454997469ca75f (diff)
Remove "internal" parameter in QTextLine::draw()
The method is split up into a private and public version, where the parameter is moved into the private method. Fixes: QTBUG-84210 Change-Id: I79e9e02c9b4cc25d31db066e5a9567fdb9bc9fd0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r--src/gui/text/qtextlayout.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index cd064364d5..35dbf677a3 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1184,7 +1184,7 @@ void QTextLayout::draw(QPainter *p, const QPointF &pos, const QList<FormatRange>
for (int line = firstLine; line < lastLine; ++line) {
QTextLine l(line, d);
- l.draw(p, position, &selection);
+ l.draw_internal(p, position, &selection);
}
p->restore();
@@ -1208,7 +1208,7 @@ void QTextLayout::draw(QPainter *p, const QPointF &pos, const QList<FormatRange>
selection.format.setProperty(SuppressBackground, true);
for (int line = firstLine; line < lastLine; ++line) {
QTextLine l(line, d);
- l.draw(p, position, &selection);
+ l.draw_internal(p, position, &selection);
}
p->restore();
}
@@ -2473,12 +2473,17 @@ QList<QGlyphRun> QTextLine::glyphRuns(int from, int length) const
#endif // QT_NO_RAWFONT
/*!
- \fn void QTextLine::draw(QPainter *painter, const QPointF &position, const QTextLayout::FormatRange *selection) const
+ \fn void QTextLine::draw(QPainter *painter, const QPointF &position) const
Draws a line on the given \a painter at the specified \a position.
- The \a selection is reserved for internal use.
*/
-void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatRange *selection) const
+void QTextLine::draw(QPainter *painter, const QPointF &position) const
+{
+ draw_internal(painter, position, nullptr);
+}
+
+void QTextLine::draw_internal(QPainter *p, const QPointF &pos,
+ const QTextLayout::FormatRange *selection) const
{
#ifndef QT_NO_RAWFONT
// Not intended to work with rawfont