Qt: deprecation warnings, again
Check Qt version for the QFontMetrics::width vs horizontalAdvance. Of course can't just #define horizontalAdvance to width, that would be too easy ...
This commit is contained in:
@@ -145,7 +145,7 @@ void NetHackQtMapViewport::SetupTextmapFont(QPainter &painter)
|
||||
QFont f(fontfamily, pts, maybebold);
|
||||
painter.setFont(QFont(fontfamily, pts));
|
||||
QFontMetrics fm = painter.fontMetrics();
|
||||
if (fm.horizontalAdvance("M") > qt_settings->glyphs().width())
|
||||
if (fm.QFM_WIDTH("M") > qt_settings->glyphs().width())
|
||||
break;
|
||||
if (fm.height() > qt_settings->glyphs().height())
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user