]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/interface_widgets.cpp
Revert "Qt4: small loop change"
[vlc] / modules / gui / qt4 / components / interface_widgets.cpp
index 0913750f06c671f3b2a6a5a25c5381c35b33da3f..e6ea283ec2cb7f48ebb2abd2ab21d8bfe5a0c9d9 100644 (file)
@@ -72,6 +72,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i )
     layout = new QHBoxLayout( this );
     layout->setContentsMargins( 0, 0, 0, 0 );
     stable = NULL;
+    show();
 }
 
 VideoWidget::~VideoWidget()
@@ -102,7 +103,7 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
     if( stable )
     {
         msg_Dbg( p_intf, "embedded video already in use" );
-        return NULL;
+        return 0;
     }
     if( b_keep_size )
     {
@@ -154,7 +155,6 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
    Parent has to care about resizing itself */
 void VideoWidget::SetSizing( unsigned int w, unsigned int h )
 {
-    if( !isVisible() ) show();
     resize( w, h );
     emit sizeChanged( w, h );
     /* Work-around a bug?misconception? that would happen when vout core resize
@@ -177,7 +177,6 @@ void VideoWidget::release( void )
     stable = NULL;
 
     updateGeometry();
-    hide();
 }
 
 /**********************************************************************
@@ -427,7 +426,7 @@ void SpeedControlWidget::updateControls( float rate )
         return;
     }
 
-    double value = 17 * log( rate ) / log( 2 );
+    double value = 17 * log( rate ) / log( 2. );
     int sliderValue = (int) ( ( value > 0 ) ? value + .5 : value - .5 );
 
     if( sliderValue < speedSlider->minimum() )