diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-02-06 15:01:32 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-02-06 14:50:37 +0000 |
commit | c01b60a4882f256eea58ffc87d3aac9ce146f98d (patch) | |
tree | c6369b1aa4b48be6741850862bcdf20d68edd179 /src/charts/legend/qlegend.cpp | |
parent | 1347a8ea80373ba3f5859ad2381c514526d3faa4 (diff) |
Fix some deprecation warningsv5.13.0-alpha1
xychart/qxyseries.cpp:1025:50: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
areachart/areachartitem.cpp:281:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
areachart/areachartitem.cpp:299:58: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]
declarativecategoryaxis.cpp:86:57: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<QPair<QString, double> >::iterator; LessThan = bool (*)(const QPair<QString, double>&, const QPair<QString, double>&)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
Change-Id: I0d7705be8690405a439e18ea0ddbfaef433037a4
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/charts/legend/qlegend.cpp')
-rw-r--r-- | src/charts/legend/qlegend.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/charts/legend/qlegend.cpp b/src/charts/legend/qlegend.cpp index 6cc9c7b6..6f5c2bb1 100644 --- a/src/charts/legend/qlegend.cpp +++ b/src/charts/legend/qlegend.cpp @@ -289,7 +289,8 @@ void QLegend::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q painter->setOpacity(opacity()); painter->setPen(d_ptr->m_pen); painter->setBrush(d_ptr->m_brush); - painter->drawRoundRect(rect(), d_ptr->roundness(rect().width()), d_ptr->roundness(rect().height())); + painter->drawRoundedRect(rect(), d_ptr->roundness(rect().width()), d_ptr->roundness(rect().height()), + Qt::RelativeSize); } |