]> git.sesse.net Git - vlc/commitdiff
Qt: repair A->B loop and close #2558
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 27 Feb 2009 00:33:32 +0000 (01:33 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 27 Feb 2009 00:33:32 +0000 (01:33 +0100)
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.hpp

index a38807ec7f2a5bfde19905af638c281898686a32..53ad7b2170d98bf146a631e89660df363acdfd76 100644 (file)
@@ -823,18 +823,23 @@ void InputManager::setAtoB()
     {
         timeB = var_GetTime( THEMIM->getInput(), "time"  );
         var_SetTime( THEMIM->getInput(), "time" , timeA );
+        CONNECT( this, positionUpdated( float, int, int ),
+                 this, AtoBLoop( float, int, int ) );
     }
     else
     {
         timeA = 0;
         timeB = 0;
+        disconnect( this, SIGNAL( positionUpdated( float, int, int ) ),
+                    this, SLOT( AtoBLoop( float, int, int ) ) );
     }
     emit AtoBchanged( (timeA != 0 ), (timeB != 0 ) );
 }
 
 /* Function called regularly when in an AtoB loop */
-void InputManager::AtoBLoop( int i_time )
+void InputManager::AtoBLoop( float, int i_time, int )
 {
+    msg_Dbg( p_intf, "I am here" );
     if( timeB )
     {
         if( ( i_time >= (int)( timeB/1000000 ) )
index 19af8ac60106bfebb605632990f4da0ed0ceb1be..69732e037f0c4538cbac2c336666248b9355c767 100644 (file)
@@ -136,7 +136,6 @@ private:
     void UpdateCaching();
     void UpdateRecord();
 
-    void AtoBLoop( int );
 
 public slots:
     void setInput( input_thread_t * ); ///< Our controlled input changed
@@ -163,6 +162,7 @@ public slots:
 
 private slots:
     void togglePlayPause();
+    void AtoBLoop( float, int, int );
 
 signals:
     /// Send new position, new time and new length