[vlc-devel] commit: Qt: remove unused code (Jakob Leben )

git version control git at videolan.org
Mon Jan 25 14:48:42 CET 2010


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Mon Jan 25 14:39:55 2010 +0100| [0b49fce1c4fc473769c09fd53bddf8ffc8a462fb] | committer: Jakob Leben 

Qt: remove unused code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0b49fce1c4fc473769c09fd53bddf8ffc8a462fb
---

 .../gui/qt4/components/playlist/standardpanel.cpp  |   51 --------------------
 .../gui/qt4/components/playlist/standardpanel.hpp  |    3 -
 2 files changed, 0 insertions(+), 54 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index ea8ae94..d406a22 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -83,9 +83,6 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
     treeView->setDropIndicatorShown( true );
     treeView->setContextMenuPolicy( Qt::CustomContextMenu );
 
-    //treeView->installEventFilter( this );
-    //<jleben> I guess we don't need that
-
     /* Saved Settings */
     getSettings()->beginGroup("Playlist");
     if( getSettings()->contains( "headerStateV2" ) )
@@ -240,13 +237,6 @@ void StandardPLPanel::search( const QString& searchText )
     model->search( searchText );
 }
 
-void StandardPLPanel::doPopup( QModelIndex index, QPoint point )
-{
-    QItemSelectionModel *selection = treeView->selectionModel();
-    QModelIndexList list = selection->selectedIndexes();
-    model->popup( index, point, list );
-}
-
 /* Set the root of the new Playlist */
 /* This activated by the selector selection */
 void StandardPLPanel::setRoot( playlist_item_t *p_item )
@@ -320,7 +310,6 @@ void StandardPLPanel::toggleView()
         {
             iconView = new PlIconView( model, this );
             layout->addWidget( iconView, 1, 0, 1, -1 );
-            //iconView->installEventFilter( this );
             iconView->setContextMenuPolicy( Qt::CustomContextMenu );
             CONNECT( iconView, customContextMenuRequested( const QPoint & ),
                      this, playlistPopup( const QPoint & ) );
@@ -335,46 +324,6 @@ void StandardPLPanel::toggleView()
     }
 }
 
-bool StandardPLPanel::eventFilter( QObject *obj, QEvent *event )
-{
-    QAbstractItemView *aView = qobject_cast<QAbstractItemView *>(obj);
-    if( !aView ) return false;
-
-    switch( event->type() )
-    {
-        case QEvent::MouseButtonPress:
-            {
-                QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
-                if( mouseEvent->button() & Qt::RightButton )
-                {
-                    QModelIndex index = aView->indexAt(
-                            QPoint( mouseEvent->x(), mouseEvent->y() ) );
-                    doPopup( index, QCursor::pos() );
-                    return true;
-                }
-                else if( mouseEvent->button() & Qt::LeftButton )
-                {
-                    if( !aView->indexAt( QPoint( mouseEvent->x(),
-                                                mouseEvent->y() ) ).isValid() )
-                        aView->clearSelection();
-                }
-                // aView->mousePressEvent( mouseEvent );
-            }
-            return true;
-        case QEvent::MouseButtonRelease:
-            {
-                QMouseEvent *mouseEvent2 = static_cast<QMouseEvent *>(event);
-                if( mouseEvent2->button() & Qt::RightButton )
-                    return false; /* Do NOT forward to QTreeView!! */
-                // aView->mouseReleaseEvent( mouseEvent );
-                return true;
-            }
-        default:
-            return false;
-    }
-    return true;
-}
-
 void StandardPLPanel::wheelEvent( QWheelEvent *e )
 {
     // Accept this event in order to prevent unwanted volume up/down changes
diff --git a/modules/gui/qt4/components/playlist/standardpanel.hpp b/modules/gui/qt4/components/playlist/standardpanel.hpp
index 0f59996..ee273e3 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.hpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.hpp
@@ -60,8 +60,6 @@ protected:
     virtual void keyPressEvent( QKeyEvent *e );
     virtual void wheelEvent( QWheelEvent *e );
 
-    bool eventFilter(QObject *obj, QEvent *event);
-
     PLModel *model;
 private:
     intf_thread_t *p_intf;
@@ -77,7 +75,6 @@ private:
     int currentRootId;
     QSignalMapper *selectColumnsSigMapper;
 
-    void doPopup( QModelIndex index, QPoint point );
 public slots:
     void removeItem( int );
     virtual void setRoot( playlist_item_t * );




More information about the vlc-devel mailing list