]> git.sesse.net Git - vlc/commitdiff
Qt4: let PLModel and PLSelector use MainInputManager instead of PlaylistEventManager
authorJakob Leben <jleben@videolan.org>
Sat, 7 Nov 2009 17:49:07 +0000 (18:49 +0100)
committerJakob Leben <jleben@videolan.org>
Sat, 7 Nov 2009 17:52:40 +0000 (18:52 +0100)
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/selector.cpp
modules/gui/qt4/components/playlist/selector.hpp

index a2d90aa2bcf9de7cbad21c658d51f1a1d8201e4a..09236151530cf1379ae3dcad9632daa355f01872 100644 (file)
@@ -32,7 +32,6 @@
 #include "components/playlist/playlist_model.hpp"
 #include "dialogs/mediainfo.hpp"
 #include "dialogs/playlist.hpp"
-#include "playlist.hpp"
 #include <vlc_intf_strings.h>
 
 #include "pixmaps/types/type_unknown.xpm"
@@ -65,7 +64,6 @@ PLModel::PLModel( playlist_t *_p_playlist,  /* THEPL */
 {
     p_intf            = _p_intf;
     p_playlist        = _p_playlist;
-    plEM              = new PlaylistEventManager( _p_playlist );
     i_cached_id       = -1;
     i_cached_input_id = -1;
     i_popup_item      = i_popup_parent = -1;
@@ -91,14 +89,15 @@ PLModel::PLModel( playlist_t *_p_playlist,  /* THEPL */
             this, processInputItemUpdate( input_item_t *) );
     CONNECT( THEMIM, inputChanged( input_thread_t * ),
             this, processInputItemUpdate( input_thread_t* ) );
-    CONNECT( plEM, itemAdded( int, int ), this, processItemAppend( int, int ) );
-    CONNECT( plEM, itemRemoved( int ), this, processItemRemoval( int ) );
+    CONNECT( THEMIM, playlistItemAppended( int, int ),
+             this, processItemAppend( int, int ) );
+    CONNECT( THEMIM, playlistItemRemoved( int ),
+             this, processItemRemoval( int ) );
 }
 
 PLModel::~PLModel()
 {
     delete rootItem;
-    delete plEM;
 }
 
 Qt::DropActions PLModel::supportedDropActions() const
index 5a505877c45903cdd210ef1d50f6b8cdb95f5a2f..ddfab8eaff6c25e2b25b12f129cf090c103d9a13 100644 (file)
@@ -44,7 +44,6 @@
 #include <QAbstractItemModel>
 #include <QVariant>
 
-class PlaylistEventManager;
 class QSignalMapper;
 class PLItem;
 
@@ -100,7 +99,6 @@ public:
 private:
 
     /* General */
-    PlaylistEventManager *plEM;
     PLItem *rootItem;
     PLItem *currentItem;
 
index edd05914051de0e57c71c71c8601215fb92a6021..946e37db9de313c88e726b7de924f0ef71afa5f2 100644 (file)
@@ -108,11 +108,9 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf )
     setDropIndicatorShown(true);
     invisibleRootItem()->setFlags( invisibleRootItem()->flags() & ~Qt::ItemIsDropEnabled );
 
-    plEM = new PlaylistEventManager( THEPL );
-
-    CONNECT( plEM, itemAdded( int, int ),
+    CONNECT( THEMIM, playlistItemAppended( int, int ),
              this, plItemAdded( int, int ) );
-    CONNECT( plEM, itemRemoved( int ),
+    CONNECT( THEMIM, playlistItemRemoved( int ),
              this, plItemRemoved( int ) );
     CONNECT( THEMIM->getIM(), metaChanged( input_item_t *),
             this, inputItemUpdate( input_item_t * ) );
@@ -131,8 +129,6 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf )
 
 PLSelector::~PLSelector()
 {
-    delete plEM;
-
     if( podcastsParent )
     {
         int c = podcastsParent->childCount();
index 1fc57483f7f8c1ce1ede42f1b3f99e323af8a7c0..e7100e3762f0b903427f4d8c69f9e8f1a71aa648 100644 (file)
@@ -42,7 +42,6 @@
 #include "qt4.hpp"
 
 class PlaylistWidget;
-class PlaylistEventManager;
 
 enum SelectorItemType {
     CATEGORY_TYPE,
@@ -136,7 +135,6 @@ private:
     PLSelItem * addPodcastItem( playlist_item_t *p_item );
     inline PLSelItem * itemWidget( QTreeWidgetItem * );
     intf_thread_t *p_intf;
-    PlaylistEventManager *plEM;
     QTreeWidgetItem *podcastsParent;
     int podcastsParentId;
 private slots: