[vlc-commits] qt: EPGChannels: replace deprecated QFontMetrics::width

Alexandre Janniaux git at videolan.org
Sun Jul 28 08:36:00 CEST 2019


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Thu Jul 25 01:14:52 2019 +0200| [9a11d6198baf46f4a42ab33f87b6688532815a0f] | committer: Jean-Baptiste Kempf

qt: EPGChannels: replace deprecated QFontMetrics::width

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a11d6198baf46f4a42ab33f87b6688532815a0f
---

 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 );
     }



More information about the vlc-commits mailing list