[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/src/scriptengine
From:       Peter Zhou <peterzhoulei () gmail ! com>
Date:       2009-07-10 18:07:59
Message-ID: 1247249279.077678.2183.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 994547 by peterzl:

fix Bug 194220, fixed the trackInserted and trackRemoved API signals

 M  +4 -7      AmarokPlaylistScript.cpp  
 M  +4 -4      AmarokPlaylistScript.h  


--- trunk/extragear/multimedia/amarok/src/scriptengine/AmarokPlaylistScript.cpp #994546:994547
@@ -156,17 +156,14 @@
         return fileNames;
     }
 
-    // PlaylistModel inserts only one track at a time
-    void AmarokPlaylistScript::slotTrackInserted( const QModelIndex&, int row, int )
+    void AmarokPlaylistScript::slotTrackInserted( const QModelIndex&, int start, int end )
     {
-        Meta::TrackPtr t = The::playlistModel()->trackAt( row );
-        emit trackInserted( QVariant::fromValue( t ), row );
+        emit trackInserted( start, end );
     }
 
-    // PlaylistModel removes only one track at a time
-    void AmarokPlaylistScript::slotTrackRemoved( const QModelIndex&, int row, int )
+    void AmarokPlaylistScript::slotTrackRemoved( const QModelIndex&, int start, int end )
     {
-        emit trackRemoved( row );
+        emit trackRemoved( start, end );
     }
 }
 
--- trunk/extragear/multimedia/amarok/src/scriptengine/AmarokPlaylistScript.h #994546:994547
@@ -58,12 +58,12 @@
 
         signals:
             void activeRowChanged( int row );
-            void trackInserted( QVariant track, int row );
-            void trackRemoved( int row );
+            void trackInserted( int start, int end );
+            void trackRemoved( int start, int end );
 
         private slots:
-            void slotTrackInserted( const QModelIndex&, int, int );
-            void slotTrackRemoved( const QModelIndex&, int, int );
+            void slotTrackInserted( const QModelIndex&, int start, int end );
+            void slotTrackRemoved( const QModelIndex&, int start, int end );
 
         private:
             QList<QObject*>* m_wrapperList;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic