[vlc-devel] [PATCH 4/7] qt: EPGChannels: replace deprecated QFontMetrics::width

Alexandre Janniaux ajanni at videolabs.io
Thu Jul 25 01:14:52 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 97319486fc..3a59705167 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.22.0



More information about the vlc-devel mailing list