[vlc-devel] commit: Qt4: let PLModel and PLSelector use MainInputManager instead of PlaylistEventManager (Jakob Leben )
git version control
git at videolan.org
Sat Nov 7 18:52:47 CET 2009
vlc | branch: master | Jakob Leben <jleben at videolan.org> | Sat Nov 7 18:49:07 2009 +0100| [6a25ed7ce66ee02957e5384ebada6eb39d81f161] | committer: Jakob Leben
Qt4: let PLModel and PLSelector use MainInputManager instead of PlaylistEventManager
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a25ed7ce66ee02957e5384ebada6eb39d81f161
---
.../gui/qt4/components/playlist/playlist_model.cpp | 9 ++++-----
.../gui/qt4/components/playlist/playlist_model.hpp | 2 --
modules/gui/qt4/components/playlist/selector.cpp | 8 ++------
modules/gui/qt4/components/playlist/selector.hpp | 2 --
4 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index a2d90aa..0923615 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -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
diff --git a/modules/gui/qt4/components/playlist/playlist_model.hpp b/modules/gui/qt4/components/playlist/playlist_model.hpp
index 5a50587..ddfab8e 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.hpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.hpp
@@ -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;
diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp
index edd0591..946e37d 100644
--- a/modules/gui/qt4/components/playlist/selector.cpp
+++ b/modules/gui/qt4/components/playlist/selector.cpp
@@ -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();
diff --git a/modules/gui/qt4/components/playlist/selector.hpp b/modules/gui/qt4/components/playlist/selector.hpp
index 1fc5748..e7100e3 100644
--- a/modules/gui/qt4/components/playlist/selector.hpp
+++ b/modules/gui/qt4/components/playlist/selector.hpp
@@ -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:
More information about the vlc-devel
mailing list