diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-02-10 12:49:46 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-02-13 16:34:34 +0000 |
commit | 57604562db870f7b05d4349761d73e054dbe04c6 (patch) | |
tree | 1c54f4b21fbb7f7eecd6a46e5201706ab86afcc4 /tests/auto/quick/qquickfontmetrics | |
parent | 48402d5c4c97bae5762668aaaf9670c644120feb (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 'tests/auto/quick/qquickfontmetrics')
-rw-r--r-- | tests/auto/quick/qquickfontmetrics/tst_quickfontmetrics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickfontmetrics/tst_quickfontmetrics.cpp b/tests/auto/quick/qquickfontmetrics/tst_quickfontmetrics.cpp index 6e516f51e1..ef61c45225 100644 --- a/tests/auto/quick/qquickfontmetrics/tst_quickfontmetrics.cpp +++ b/tests/auto/quick/qquickfontmetrics/tst_quickfontmetrics.cpp @@ -127,7 +127,7 @@ void tst_QuickFontMetrics::functions() QFontMetricsF expected = QFontMetricsF(QFont()); QCOMPARE(metrics.elidedText(text, mode, width, flags), expected.elidedText(text, mode, width, flags)); - QCOMPARE(metrics.advanceWidth(text), expected.width(text)); + QCOMPARE(metrics.advanceWidth(text), expected.horizontalAdvance(text)); QCOMPARE(metrics.boundingRect(text), expected.boundingRect(text)); QCOMPARE(metrics.tightBoundingRect(text), expected.tightBoundingRect(text)); } |