[vlc-commits] Qt: fix MLModel

Francois Cartegnie git at videolan.org
Tue Jan 24 19:31:56 CET 2012


vlc/vlc-1.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 24 17:00:17 2012 +0100| [233b642500252f95bb56e14a7f061e4f253299e1] | committer: Jean-Baptiste Kempf

Qt: fix MLModel

Was broken since the pure virtual method getId() was renamed in
the PLModel cleanup 4a61e6a8da6f138d9eb506229afffeea329f5414
(cherry picked from commit 88ecb49beedf3a62133ef4d062ee2e350b604aa2)

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

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.2.git/?a=commit;h=233b642500252f95bb56e14a7f061e4f253299e1
---

 modules/gui/qt4/components/playlist/ml_model.cpp |    4 ++--
 modules/gui/qt4/components/playlist/ml_model.hpp |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/ml_model.cpp b/modules/gui/qt4/components/playlist/ml_model.cpp
index 3aae7dd..8680939 100644
--- a/modules/gui/qt4/components/playlist/ml_model.cpp
+++ b/modules/gui/qt4/components/playlist/ml_model.cpp
@@ -237,7 +237,7 @@ void MLModel::doDelete( QModelIndexList list )
 {
     for (int i = 0; i < list.count(); ++i)
     {
-        int id = getId( list.at(i) );
+        int id = itemId( list.at(i) );
         ml_DeleteSimple( p_ml, id );
     }
 }
@@ -254,7 +254,7 @@ void MLModel::remove( QModelIndex idx )
     }
 }
 
-int MLModel::getId( QModelIndex index ) const
+int MLModel::itemId( const QModelIndex &index ) const
 {
     return getItem( index )->id();
 }
diff --git a/modules/gui/qt4/components/playlist/ml_model.hpp b/modules/gui/qt4/components/playlist/ml_model.hpp
index c1994d0..17bafc1 100644
--- a/modules/gui/qt4/components/playlist/ml_model.hpp
+++ b/modules/gui/qt4/components/playlist/ml_model.hpp
@@ -60,7 +60,7 @@ public:
             return static_cast<MLItem*>( index.internalPointer() );
         else return NULL;
     }
-    virtual int getId( QModelIndex index ) const;
+    virtual int itemId( const QModelIndex & ) const;
 
     QVariant data( const QModelIndex &idx, const int role = Qt::DisplayRole ) const;
     bool setData( const QModelIndex &idx, const QVariant &value,



More information about the vlc-commits mailing list