[vlc-devel] commit: Revert "QT4: set sorting-connections by hand" ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Aug 1 14:52:36 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 1 15:46:51 2009 +0300| [454405607f658dd92b9454803b88308afddd7da3] | committer: Rémi Denis-Courmont
Revert "QT4: set sorting-connections by hand"
This reverts commit 3266085e187fc97cf3e037e6f9ea9dabefa2c4bc.
It triggers a crash whenever sorting manually.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=454405607f658dd92b9454803b88308afddd7da3
---
.../gui/qt4/components/playlist/standardpanel.cpp | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 1741d45..51cb0f9 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -61,8 +61,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Create and configure the QTreeView */
view = new QVLCTreeView;
-
-
+ view->header()->setSortIndicator( 0 , Qt::AscendingOrder );
+ view->setSortingEnabled( true );
view->setModel( model );
view->setIconSize( QSize( 20, 20 ) );
view->setAlternatingRowColors( true );
@@ -86,15 +86,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
view->header()->resizeSection( 0, 200 );
view->header()->resizeSection( 1, 80 );
}
+ view->header()->setSortIndicatorShown( true );
view->header()->setClickable( true );
view->header()->setContextMenuPolicy( Qt::CustomContextMenu );
getSettings()->endGroup();
- /* Set sorting enable by hand, so it doesn't run sort on start */
- view->header()->setSortIndicator( -1, Qt::AscendingOrder );
- view->header()->setSortIndicatorShown( true );
- CONNECT( view->header(), sortIndicatorChanged( int, Qt::SortOrder ),
- view, sortByColumn( int ) );
/* Connections for the TreeView */
CONNECT( view, activated( const QModelIndex& ) ,
model,activateItem( const QModelIndex& ) );
More information about the vlc-devel
mailing list