mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
Use less Closure arguments.
This commit is contained in:
@@ -147,7 +147,7 @@ PlaylistItemDelegate::createEditor( QWidget* parent, const QStyleOptionViewItem&
|
|||||||
editor->addItems( formats );
|
editor->addItems( formats );
|
||||||
|
|
||||||
_detail::Closure* closure = NewClosure( editor, SIGNAL( activated( int ) ),
|
_detail::Closure* closure = NewClosure( editor, SIGNAL( activated( int ) ),
|
||||||
const_cast<PlaylistItemDelegate*>(this), SLOT( closeEditor( const QModelIndex&, PlayableItem*, QComboBox* ) ), index, item, editor );
|
const_cast<PlaylistItemDelegate*>(this), SLOT( closeEditor( const QModelIndex&, QWidget* ) ), index, editor );
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,8 +156,11 @@ PlaylistItemDelegate::createEditor( QWidget* parent, const QStyleOptionViewItem&
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PlaylistItemDelegate::closeEditor( const QModelIndex& index, PlayableItem* item, QComboBox* editor )
|
PlaylistItemDelegate::closeEditor( const QModelIndex& index, QWidget* editor )
|
||||||
{
|
{
|
||||||
|
PlayableItem* item = m_model->itemFromIndex( m_model->mapToSource( index ) );
|
||||||
|
Q_ASSERT( item );
|
||||||
|
|
||||||
m_view->closePersistentEditor( index );
|
m_view->closePersistentEditor( index );
|
||||||
|
|
||||||
QComboBox* cb = static_cast< QComboBox* >(editor);
|
QComboBox* cb = static_cast< QComboBox* >(editor);
|
||||||
|
@@ -57,7 +57,7 @@ signals:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void doUpdateIndex( const QPersistentModelIndex& index );
|
void doUpdateIndex( const QPersistentModelIndex& index );
|
||||||
void closeEditor( const QModelIndex& index, PlayableItem* item, QComboBox* editor );
|
void closeEditor( const QModelIndex& index, QWidget* editor );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, PlayableItem* item ) const;
|
void prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, PlayableItem* item ) const;
|
||||||
|
Reference in New Issue
Block a user