mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +02:00
Cleanup
This commit is contained in:
@@ -1305,7 +1305,7 @@ TomahawkSettings::updateIndex()
|
|||||||
DatabaseCommand* cmd = new DatabaseCommand_UpdateSearchIndex();
|
DatabaseCommand* cmd = new DatabaseCommand_UpdateSearchIndex();
|
||||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );
|
||||||
|
|
||||||
QTimer::singleShot( 2000, this, SLOT( updateIndex() ) );
|
QTimer::singleShot( 5000, this, SLOT( updateIndex() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -44,10 +44,6 @@ JobStatusSortModel::setJobModel( JobStatusModel* model )
|
|||||||
|
|
||||||
m_sourceModel = model;
|
m_sourceModel = model;
|
||||||
|
|
||||||
connect( m_sourceModel, SIGNAL( rowsInserted( QModelIndex, int, int ) ), this, SLOT( rowsInsertedSlot( QModelIndex, int, int ) ) );
|
|
||||||
connect( m_sourceModel, SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SLOT( rowsRemovedSlot( QModelIndex, int, int ) ) );
|
|
||||||
connect( m_sourceModel, SIGNAL( modelReset() ), this, SLOT( modelResetSlot() ) );
|
|
||||||
connect( m_sourceModel, SIGNAL( dataChanged( QModelIndex, QModelIndex ) ), this, SLOT( dataChangedSlot( QModelIndex, QModelIndex ) ) );
|
|
||||||
connect( m_sourceModel, SIGNAL( customDelegateJobInserted( int, JobStatusItem* ) ), this, SLOT( customDelegateJobInsertedSlot( int, JobStatusItem* ) ) );
|
connect( m_sourceModel, SIGNAL( customDelegateJobInserted( int, JobStatusItem* ) ), this, SLOT( customDelegateJobInsertedSlot( int, JobStatusItem* ) ) );
|
||||||
connect( m_sourceModel, SIGNAL( customDelegateJobRemoved( int ) ), this, SLOT( customDelegateJobRemovedSlot( int ) ) );
|
connect( m_sourceModel, SIGNAL( customDelegateJobRemoved( int ) ), this, SLOT( customDelegateJobRemovedSlot( int ) ) );
|
||||||
connect( m_sourceModel, SIGNAL( refreshDelegates() ), this, SLOT( refreshDelegatesSlot() ) );
|
connect( m_sourceModel, SIGNAL( refreshDelegates() ), this, SLOT( refreshDelegatesSlot() ) );
|
||||||
@@ -61,34 +57,6 @@ JobStatusSortModel::addJob( JobStatusItem* item )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
JobStatusSortModel::rowsInsertedSlot( const QModelIndex& index, int start, int end )
|
|
||||||
{
|
|
||||||
emit checkCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
JobStatusSortModel::rowsRemovedSlot( const QModelIndex& index, int start, int end )
|
|
||||||
{
|
|
||||||
emit checkCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
JobStatusSortModel::modelResetSlot()
|
|
||||||
{
|
|
||||||
emit checkCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
JobStatusSortModel::dataChangedSlot( const QModelIndex& topLeft, const QModelIndex& bottomRight )
|
|
||||||
{
|
|
||||||
emit dataChanged( mapFromSource( topLeft ), mapFromSource( bottomRight ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
JobStatusSortModel::customDelegateJobInsertedSlot( int row, JobStatusItem* item )
|
JobStatusSortModel::customDelegateJobInsertedSlot( int row, JobStatusItem* item )
|
||||||
{
|
{
|
||||||
|
@@ -85,10 +85,6 @@ signals:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void addJob( JobStatusItem* item );
|
void addJob( JobStatusItem* item );
|
||||||
void rowsInsertedSlot( const QModelIndex& index, int start, int end );
|
|
||||||
void rowsRemovedSlot( const QModelIndex& index, int start, int end );
|
|
||||||
void modelResetSlot();
|
|
||||||
void dataChangedSlot( const QModelIndex& topLeft, const QModelIndex& bottomRight );
|
|
||||||
void customDelegateJobInsertedSlot( int row, JobStatusItem* item);
|
void customDelegateJobInsertedSlot( int row, JobStatusItem* item);
|
||||||
void customDelegateJobRemovedSlot( int row );
|
void customDelegateJobRemovedSlot( int row );
|
||||||
void refreshDelegatesSlot();
|
void refreshDelegatesSlot();
|
||||||
|
@@ -89,9 +89,9 @@ JobStatusView::setModel( JobStatusSortModel* m )
|
|||||||
m_view->setModel( m );
|
m_view->setModel( m );
|
||||||
m_view->setItemDelegate( new JobStatusDelegate( m_view ) );
|
m_view->setItemDelegate( new JobStatusDelegate( m_view ) );
|
||||||
|
|
||||||
connect( m_view->model(), SIGNAL( checkCount() ), this, SLOT( checkCount() ) );
|
connect( m_view->model(), SIGNAL( rowsInserted( QModelIndex, int, int ) ), this, SLOT( checkCount() ) );
|
||||||
connect( m_view->model(), SIGNAL( checkCount() ), this, SLOT( checkCount() ) );
|
connect( m_view->model(), SIGNAL( rowsRemoved( QModelIndex, int, int ) ), this, SLOT( checkCount() ) );
|
||||||
connect( m_view->model(), SIGNAL( checkCount() ), this, SLOT( checkCount() ) );
|
connect( m_view->model(), SIGNAL( modelReset() ), this, SLOT( checkCount() ) );
|
||||||
connect( m_view->model(), SIGNAL( customDelegateJobInserted( int, JobStatusItem* ) ), this, SLOT( customDelegateJobInserted( int, JobStatusItem* ) ) );
|
connect( m_view->model(), SIGNAL( customDelegateJobInserted( int, JobStatusItem* ) ), this, SLOT( customDelegateJobInserted( int, JobStatusItem* ) ) );
|
||||||
connect( m_view->model(), SIGNAL( customDelegateJobRemoved( int ) ), this, SLOT( customDelegateJobRemoved( int ) ) );
|
connect( m_view->model(), SIGNAL( customDelegateJobRemoved( int ) ), this, SLOT( customDelegateJobRemoved( int ) ) );
|
||||||
connect( m_view->model(), SIGNAL( refreshDelegates() ), this, SLOT( refreshDelegates() ) );
|
connect( m_view->model(), SIGNAL( refreshDelegates() ), this, SLOT( refreshDelegates() ) );
|
||||||
|
Reference in New Issue
Block a user