summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-08-16 11:00:53 (GMT)
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-08-16 11:00:53 (GMT)
commit72c1cb2ffdfb2742985e12025d4578aa2fe80ce7 (patch)
tree970fe5d701a46e57a3a1bab3870f189698fab27d /src/gui/text
parentaa09d4f9c2d47348e6eac76e66500f4807b132a3 (diff)
downloadQt-72c1cb2ffdfb2742985e12025d4578aa2fe80ce7.zip
Qt-72c1cb2ffdfb2742985e12025d4578aa2fe80ce7.tar.gz
Qt-72c1cb2ffdfb2742985e12025d4578aa2fe80ce7.tar.bz2
Doc: Fix links and silence qdoc warnings.
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontmetrics.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index 3e074a7..b3d1a5f 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -859,24 +859,23 @@ QRect QFontMetrics::tightBoundingRect(const QString &text) const
right-to-left layouts, and on the left side for right-to-left
layouts. Note that this behavior is independent of the text
language.
-
*/
-QString QFontMetrics::elidedText(const QString &_text, Qt::TextElideMode mode, int width, int flags) const
+QString QFontMetrics::elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags) const
{
- QString text = _text;
+ QString _text = text;
if (!(flags & Qt::TextLongestVariant)) {
int posA = 0;
- int posB = text.indexOf(QLatin1Char('\x9c'));
+ int posB = _text.indexOf(QLatin1Char('\x9c'));
while (posB >= 0) {
- QString portion = text.mid(posA, posB - posA);
+ QString portion = _text.mid(posA, posB - posA);
if (size(flags, portion).width() <= width)
return portion;
posA = posB + 1;
- posB = text.indexOf(QLatin1Char('\x9c'), posA);
+ posB = _text.indexOf(QLatin1Char('\x9c'), posA);
}
- text = text.mid(posA);
+ _text = _text.mid(posA);
}
- QStackTextEngine engine(text, QFont(d));
+ QStackTextEngine engine(_text, QFont(d));
return engine.elidedText(mode, width, flags);
}