Commit 45440560 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Revert "QT4: set sorting-connections by hand"

This reverts commit 3266085e.
It triggers a crash whenever sorting manually.
parent a68a736b
...@@ -61,8 +61,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -61,8 +61,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
/* Create and configure the QTreeView */ /* Create and configure the QTreeView */
view = new QVLCTreeView; view = new QVLCTreeView;
view->header()->setSortIndicator( 0 , Qt::AscendingOrder );
view->setSortingEnabled( true );
view->setModel( model ); view->setModel( model );
view->setIconSize( QSize( 20, 20 ) ); view->setIconSize( QSize( 20, 20 ) );
view->setAlternatingRowColors( true ); view->setAlternatingRowColors( true );
...@@ -86,15 +86,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, ...@@ -86,15 +86,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
view->header()->resizeSection( 0, 200 ); view->header()->resizeSection( 0, 200 );
view->header()->resizeSection( 1, 80 ); view->header()->resizeSection( 1, 80 );
} }
view->header()->setSortIndicatorShown( true );
view->header()->setClickable( true ); view->header()->setClickable( true );
view->header()->setContextMenuPolicy( Qt::CustomContextMenu ); view->header()->setContextMenuPolicy( Qt::CustomContextMenu );
getSettings()->endGroup(); 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 */ /* Connections for the TreeView */
CONNECT( view, activated( const QModelIndex& ) , CONNECT( view, activated( const QModelIndex& ) ,
model,activateItem( const QModelIndex& ) ); model,activateItem( const QModelIndex& ) );
......
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