aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-10 12:49:46 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-13 16:34:34 +0000
commit57604562db870f7b05d4349761d73e054dbe04c6 (patch)
tree1c54f4b21fbb7f7eecd6a46e5201706ab86afcc4 /src/quick/items/qquicktext.cpp
parent48402d5c4c97bae5762668aaaf9670c644120feb (diff)
QtDeclarative: replace deprecated functions
Replace the deprecated functions with it successors: - QFontMetrics::width() -> horizontalAdvance() - QLayout::setMargin() -> setContentsMargins() Change-Id: I2a2557cdb2eaec40e2c9955a0082372c582ec6b8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/quick/items/qquicktext.cpp')
-rw-r--r--src/quick/items/qquicktext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index dd7fbccff5..9e447d40ac 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -643,7 +643,7 @@ QString QQuickTextPrivate::elidedText(qreal lineWidth, const QTextLine &line, QT
// Appending the elide character may push the line over the maximum width
// in which case the elided text will need to be elided.
QFontMetricsF metrics(layout.font());
- if (metrics.width(elideChar) + line.naturalTextWidth() >= lineWidth)
+ if (metrics.horizontalAdvance(elideChar) + line.naturalTextWidth() >= lineWidth)
elideText = metrics.elidedText(elideText, Qt::TextElideMode(elideMode), lineWidth);
}
return elideText;