diff options
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 066f258ea3..87f73e1e83 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -93,14 +93,14 @@ QT_BEGIN_NAMESPACE Specifies the format to apply. */ -/*! \fn bool operator==(const FormatRange &lhs, const FormatRange &rhs) +/*! \fn bool operator==(const QTextLayout::FormatRange &lhs, const QTextLayout::FormatRange &rhs) \relates QTextLayout::FormatRange Returns true if the \c {start}, \c {length}, and \c {format} fields in \a lhs and \a rhs contain the same values respectively. */ -/*! \fn bool operator!=(const FormatRange &lhs, const FormatRange &rhs) +/*! \fn bool operator!=(const QTextLayout::FormatRange &lhs, const QTextLayout::FormatRange &rhs) \relates QTextLayout::FormatRange Returns true if any of the \c {start}, \c {length}, or \c {format} fields @@ -2453,7 +2453,7 @@ void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatR const qreal lineHeight = line.height().toReal(); QRectF r(pos.x() + line.x.toReal(), pos.y() + line.y.toReal(), - lineHeight / 2, QFontMetrics(eng->font()).width(QLatin1Char(' '))); + lineHeight / 2, QFontMetrics(eng->font()).horizontalAdvance(QLatin1Char(' '))); setPenAndDrawBackground(p, QPen(), selection->format, r); p->setPen(pen); } @@ -2540,7 +2540,7 @@ void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatR QPainterPrivate::get(p)->drawTextItem(QPointF(iterator.x.toReal(), y.toReal()), gf, eng); if (eng->option.flags() & QTextOption::ShowTabsAndSpaces) { QChar visualTab(0x2192); - int w = QFontMetrics(f).width(visualTab); + int w = QFontMetrics(f).horizontalAdvance(visualTab); qreal x = iterator.itemWidth.toReal() - w; // Right-aligned if (x < 0) p->setClipRect(QRectF(iterator.x.toReal(), line.y.toReal(), |