Qt: fix Qt 5.15 deprecation warning
QFont::ForceIntegerMetrics is deprecated, and the floating-point
variant of QFontMetrics is no longer used anyway since 96eec0beb9
.
Change the font_width_ member to int, as should have been done in
that commit.
This commit is contained in:
parent
a973416077
commit
e74b6bdebe
|
@ -184,7 +184,6 @@ void ByteViewText::markAppendix(int start, int length)
|
|||
void ByteViewText::setMonospaceFont(const QFont &mono_font)
|
||||
{
|
||||
QFont int_font(mono_font);
|
||||
int_font.setStyleStrategy(QFont::ForceIntegerMetrics);
|
||||
|
||||
setFont(int_font);
|
||||
viewport()->setFont(int_font);
|
||||
|
|
|
@ -120,7 +120,7 @@ private:
|
|||
bool show_hex_; // Should we show the hex display?
|
||||
bool show_ascii_; // Should we show the ASCII display?
|
||||
int row_width_; // Number of bytes per line
|
||||
qreal font_width_; // Single character width and text margin. NOTE: Use fontMetrics::width for multiple characters.
|
||||
int font_width_; // Single character width and text margin. NOTE: Use fontMetrics::width for multiple characters.
|
||||
int line_height_; // Font line spacing
|
||||
QList<QRect> hover_outlines_; // Hovered byte outlines.
|
||||
|
||||
|
|
Loading…
Reference in New Issue