Commit 6a25ed7c authored by Jakob Leben's avatar Jakob Leben

Qt4: let PLModel and PLSelector use MainInputManager instead of PlaylistEventManager

parent 24a911ff
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "components/playlist/playlist_model.hpp" #include "components/playlist/playlist_model.hpp"
#include "dialogs/mediainfo.hpp" #include "dialogs/mediainfo.hpp"
#include "dialogs/playlist.hpp" #include "dialogs/playlist.hpp"
#include "playlist.hpp"
#include <vlc_intf_strings.h> #include <vlc_intf_strings.h>
#include "pixmaps/types/type_unknown.xpm" #include "pixmaps/types/type_unknown.xpm"
...@@ -65,7 +64,6 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */ ...@@ -65,7 +64,6 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
{ {
p_intf = _p_intf; p_intf = _p_intf;
p_playlist = _p_playlist; p_playlist = _p_playlist;
plEM = new PlaylistEventManager( _p_playlist );
i_cached_id = -1; i_cached_id = -1;
i_cached_input_id = -1; i_cached_input_id = -1;
i_popup_item = i_popup_parent = -1; i_popup_item = i_popup_parent = -1;
...@@ -91,14 +89,15 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */ ...@@ -91,14 +89,15 @@ PLModel::PLModel( playlist_t *_p_playlist, /* THEPL */
this, processInputItemUpdate( input_item_t *) ); this, processInputItemUpdate( input_item_t *) );
CONNECT( THEMIM, inputChanged( input_thread_t * ), CONNECT( THEMIM, inputChanged( input_thread_t * ),
this, processInputItemUpdate( input_thread_t* ) ); this, processInputItemUpdate( input_thread_t* ) );
CONNECT( plEM, itemAdded( int, int ), this, processItemAppend( int, int ) ); CONNECT( THEMIM, playlistItemAppended( int, int ),
CONNECT( plEM, itemRemoved( int ), this, processItemRemoval( int ) ); this, processItemAppend( int, int ) );
CONNECT( THEMIM, playlistItemRemoved( int ),
this, processItemRemoval( int ) );
} }
PLModel::~PLModel() PLModel::~PLModel()
{ {
delete rootItem; delete rootItem;
delete plEM;
} }
Qt::DropActions PLModel::supportedDropActions() const Qt::DropActions PLModel::supportedDropActions() const
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
#include <QAbstractItemModel> #include <QAbstractItemModel>
#include <QVariant> #include <QVariant>
class PlaylistEventManager;
class QSignalMapper; class QSignalMapper;
class PLItem; class PLItem;
...@@ -100,7 +99,6 @@ public: ...@@ -100,7 +99,6 @@ public:
private: private:
/* General */ /* General */
PlaylistEventManager *plEM;
PLItem *rootItem; PLItem *rootItem;
PLItem *currentItem; PLItem *currentItem;
......
...@@ -108,11 +108,9 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf ) ...@@ -108,11 +108,9 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf )
setDropIndicatorShown(true); setDropIndicatorShown(true);
invisibleRootItem()->setFlags( invisibleRootItem()->flags() & ~Qt::ItemIsDropEnabled ); invisibleRootItem()->setFlags( invisibleRootItem()->flags() & ~Qt::ItemIsDropEnabled );
plEM = new PlaylistEventManager( THEPL ); CONNECT( THEMIM, playlistItemAppended( int, int ),
CONNECT( plEM, itemAdded( int, int ),
this, plItemAdded( int, int ) ); this, plItemAdded( int, int ) );
CONNECT( plEM, itemRemoved( int ), CONNECT( THEMIM, playlistItemRemoved( int ),
this, plItemRemoved( int ) ); this, plItemRemoved( int ) );
CONNECT( THEMIM->getIM(), metaChanged( input_item_t *), CONNECT( THEMIM->getIM(), metaChanged( input_item_t *),
this, inputItemUpdate( input_item_t * ) ); this, inputItemUpdate( input_item_t * ) );
...@@ -131,8 +129,6 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf ) ...@@ -131,8 +129,6 @@ PLSelector::PLSelector( QWidget *p, intf_thread_t *_p_intf )
PLSelector::~PLSelector() PLSelector::~PLSelector()
{ {
delete plEM;
if( podcastsParent ) if( podcastsParent )
{ {
int c = podcastsParent->childCount(); int c = podcastsParent->childCount();
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include "qt4.hpp" #include "qt4.hpp"
class PlaylistWidget; class PlaylistWidget;
class PlaylistEventManager;
enum SelectorItemType { enum SelectorItemType {
CATEGORY_TYPE, CATEGORY_TYPE,
...@@ -136,7 +135,6 @@ private: ...@@ -136,7 +135,6 @@ private:
PLSelItem * addPodcastItem( playlist_item_t *p_item ); PLSelItem * addPodcastItem( playlist_item_t *p_item );
inline PLSelItem * itemWidget( QTreeWidgetItem * ); inline PLSelItem * itemWidget( QTreeWidgetItem * );
intf_thread_t *p_intf; intf_thread_t *p_intf;
PlaylistEventManager *plEM;
QTreeWidgetItem *podcastsParent; QTreeWidgetItem *podcastsParent;
int podcastsParentId; int podcastsParentId;
private slots: private slots:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment