Fix compiler warnings for QFontMetrics use
Change-Id: I4c416280cef8c316258817184e94962c250370da Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit d6b9200e329281269ad8c74177f2b2621798ae56) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b5ff6da096
commit
c834aefa77
@ -607,7 +607,7 @@ QSize QAndroidStyle::sizeFromContents(ContentsType ct,
|
|||||||
if (qApp->styleSheet().isEmpty())
|
if (qApp->styleSheet().isEmpty())
|
||||||
txt = hdr->fontMetrics.size(0, hdr->text);
|
txt = hdr->fontMetrics.size(0, hdr->text);
|
||||||
else
|
else
|
||||||
txt = qApp->fontMetrics().size(0, hdr->text);
|
txt = QFontMetrics(QApplication::font()).size(0, hdr->text);
|
||||||
|
|
||||||
sz.setHeight(margin + qMax(iconSize, txt.height()) + margin);
|
sz.setHeight(margin + qMax(iconSize, txt.height()) + margin);
|
||||||
sz.setWidth((nullIcon ? 0 : margin) + iconSize
|
sz.setWidth((nullIcon ? 0 : margin) + iconSize
|
||||||
|
Loading…
x
Reference in New Issue
Block a user