mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 08:04:25 +02:00
Fix some bad function usage asserts
This commit is contained in:
@@ -38,7 +38,7 @@ AlbumProxyModel::AlbumProxyModel( QObject* parent )
|
|||||||
setSortCaseSensitivity( Qt::CaseInsensitive );
|
setSortCaseSensitivity( Qt::CaseInsensitive );
|
||||||
setDynamicSortFilter( true );
|
setDynamicSortFilter( true );
|
||||||
|
|
||||||
setSourceModel( 0 );
|
setSourceAlbumModel( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -87,7 +87,7 @@ AlbumView::setAlbumModel( AlbumModel* model )
|
|||||||
|
|
||||||
if ( m_proxyModel )
|
if ( m_proxyModel )
|
||||||
{
|
{
|
||||||
m_proxyModel->setSourceModel( m_model );
|
m_proxyModel->setSourceAlbumModel( m_model );
|
||||||
m_proxyModel->sort( 0 );
|
m_proxyModel->sort( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -62,7 +62,7 @@ CollectionView::setModel( QAbstractItemModel* model )
|
|||||||
void
|
void
|
||||||
CollectionView::setTrackModel( TrackModel* model )
|
CollectionView::setTrackModel( TrackModel* model )
|
||||||
{
|
{
|
||||||
TrackView::setModel( model );
|
TrackView::setTrackModel( model );
|
||||||
setGuid( "collectionview" );
|
setGuid( "collectionview" );
|
||||||
|
|
||||||
connect( model, SIGNAL( trackCountChanged( unsigned int ) ), SLOT( onTrackCountChanged( unsigned int ) ) );
|
connect( model, SIGNAL( trackCountChanged( unsigned int ) ), SLOT( onTrackCountChanged( unsigned int ) ) );
|
||||||
|
@@ -89,7 +89,7 @@ PlaylistManager::PlaylistManager( QObject* parent )
|
|||||||
|
|
||||||
m_queueView = new QueueView( m_splitter );
|
m_queueView = new QueueView( m_splitter );
|
||||||
m_queueModel = new PlaylistModel( m_queueView );
|
m_queueModel = new PlaylistModel( m_queueView );
|
||||||
m_queueView->queue()->setModel( m_queueModel );
|
m_queueView->queue()->setPlaylistModel( m_queueModel );
|
||||||
AudioEngine::instance()->setQueue( m_queueView->queue()->proxyModel() );
|
AudioEngine::instance()->setQueue( m_queueView->queue()->proxyModel() );
|
||||||
|
|
||||||
m_splitter->addWidget( m_queueView );
|
m_splitter->addWidget( m_queueView );
|
||||||
@@ -102,14 +102,14 @@ PlaylistManager::PlaylistManager( QObject* parent )
|
|||||||
|
|
||||||
m_superCollectionView = new CollectionView();
|
m_superCollectionView = new CollectionView();
|
||||||
m_superCollectionFlatModel = new CollectionFlatModel( m_superCollectionView );
|
m_superCollectionFlatModel = new CollectionFlatModel( m_superCollectionView );
|
||||||
m_superCollectionView->setModel( m_superCollectionFlatModel );
|
m_superCollectionView->setTrackModel( m_superCollectionFlatModel );
|
||||||
m_superCollectionView->setFrameShape( QFrame::NoFrame );
|
m_superCollectionView->setFrameShape( QFrame::NoFrame );
|
||||||
m_superCollectionView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
m_superCollectionView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
m_superCollectionView->proxyModel()->setShowOfflineResults( false );
|
m_superCollectionView->proxyModel()->setShowOfflineResults( false );
|
||||||
|
|
||||||
m_superAlbumView = new AlbumView();
|
m_superAlbumView = new AlbumView();
|
||||||
m_superAlbumModel = new AlbumModel( m_superAlbumView );
|
m_superAlbumModel = new AlbumModel( m_superAlbumView );
|
||||||
m_superAlbumView->setModel( m_superAlbumModel );
|
m_superAlbumView->setAlbumModel( m_superAlbumModel );
|
||||||
m_superAlbumView->setFrameShape( QFrame::NoFrame );
|
m_superAlbumView->setFrameShape( QFrame::NoFrame );
|
||||||
m_superAlbumView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
m_superAlbumView->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ PlaylistView::setPlaylistModel( PlaylistModel* model )
|
|||||||
{
|
{
|
||||||
m_model = model;
|
m_model = model;
|
||||||
|
|
||||||
TrackView::setModel( m_model );
|
TrackView::setTrackModel( m_model );
|
||||||
setColumnHidden( 5, true ); // Hide age column per default
|
setColumnHidden( 5, true ); // Hide age column per default
|
||||||
|
|
||||||
if ( !m_model->playlist().isNull() )
|
if ( !m_model->playlist().isNull() )
|
||||||
|
@@ -40,7 +40,7 @@ TrackProxyModel::TrackProxyModel( QObject* parent )
|
|||||||
setSortCaseSensitivity( Qt::CaseInsensitive );
|
setSortCaseSensitivity( Qt::CaseInsensitive );
|
||||||
setDynamicSortFilter( true );
|
setDynamicSortFilter( true );
|
||||||
|
|
||||||
setSourceModel( 0 );
|
setSourceTrackModel( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -124,7 +124,7 @@ TrackView::setTrackModel( TrackModel* model )
|
|||||||
|
|
||||||
if ( m_proxyModel )
|
if ( m_proxyModel )
|
||||||
{
|
{
|
||||||
m_proxyModel->setSourceModel( m_model );
|
m_proxyModel->setSourceTrackModel( m_model );
|
||||||
}
|
}
|
||||||
|
|
||||||
connect( m_model, SIGNAL( itemSizeChanged( QModelIndex ) ), SLOT( onItemResized( QModelIndex ) ) );
|
connect( m_model, SIGNAL( itemSizeChanged( QModelIndex ) ), SLOT( onItemResized( QModelIndex ) ) );
|
||||||
|
@@ -47,7 +47,7 @@ WelcomeWidget::WelcomeWidget( QWidget* parent )
|
|||||||
ui->tracksView->overlay()->setEnabled( false );
|
ui->tracksView->overlay()->setEnabled( false );
|
||||||
|
|
||||||
m_tracksModel = new PlaylistModel( ui->tracksView );
|
m_tracksModel = new PlaylistModel( ui->tracksView );
|
||||||
ui->tracksView->setModel( m_tracksModel );
|
ui->tracksView->setPlaylistModel( m_tracksModel );
|
||||||
m_tracksModel->loadHistory( Tomahawk::source_ptr(), HISTORY_TRACK_ITEMS );
|
m_tracksModel->loadHistory( Tomahawk::source_ptr(), HISTORY_TRACK_ITEMS );
|
||||||
|
|
||||||
m_timer = new QTimer( this );
|
m_timer = new QTimer( this );
|
||||||
|
Reference in New Issue
Block a user