[vlc-devel] [PATCH] Qt: fix slider memleak
Francois Cartegnie
fcvlcdev at free.fr
Sat Mar 6 16:18:54 CET 2010
---
modules/gui/qt4/util/input_slider.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index 9d57d3e..704c6d8 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -308,6 +308,8 @@ void SoundSlider::paintEvent( QPaintEvent *e )
{
QPainter painter( this );
QPixmap *pixGradient;
+ QString valueString;
+
if (b_isMuted)
pixGradient = &this->pixGradient2;
else
@@ -325,8 +327,9 @@ void SoundSlider::paintEvent( QPaintEvent *e )
QFont font; font.setPixelSize( 9 );
painter.setFont( font );
const QRect rect( 0, 0, 34, 15 );
+ valueString.setNum( value(), 10 );
painter.drawText( rect, Qt::AlignRight | Qt::AlignVCenter,
- QString::number( value() ) + '%' );
+ valueString + '%' );
painter.end();
e->accept();
--
1.6.4.4
More information about the vlc-devel
mailing list