[vlc-devel] [PATCH] qt: replace deprecated QFontMetrics::width with horizontalAdvance

Marvin Scholz epirat07 at gmail.com
Fri Jul 26 21:59:49 CEST 2019


---
 modules/gui/qt/components/epg/EPGChannels.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/components/epg/EPGChannels.cpp b/modules/gui/qt/components/epg/EPGChannels.cpp
index f0230b2f10..c5763fa9c4 100644
--- a/modules/gui/qt/components/epg/EPGChannels.cpp
+++ b/modules/gui/qt/components/epg/EPGChannels.cpp
@@ -82,7 +82,7 @@ void EPGChannels::paintEvent( QPaintEvent *event )
         p.drawText( 0, - m_offset + ( i++ + 0.5 ) * TRACKS_HEIGHT - 4,
                     width(), height(), Qt::AlignLeft, text );
 
-        int i_width = fontMetrics().width( text );
+        int i_width = fontMetrics().horizontalAdvance( text );
         if( width() < i_width )
             setMinimumWidth( i_width );
     }
-- 
2.19.1



More information about the vlc-devel mailing list