mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-01-17 22:38:33 +01:00
Prepend tracks to inbox, and avoid crash.
This commit is contained in:
parent
2dd5515392
commit
fd60cf4a5b
@ -98,9 +98,10 @@ DatabaseCommand_ShareTrack::postCommitHook()
|
||||
return;
|
||||
|
||||
QMetaObject::invokeMethod( ViewManager::instance()->inboxModel(),
|
||||
"appendQuery",
|
||||
"insertQuery",
|
||||
Qt::QueuedConnection,
|
||||
Q_ARG( const Tomahawk::query_ptr&, m_query ) );
|
||||
Q_ARG( const Tomahawk::query_ptr&, m_query ),
|
||||
Q_ARG( int, 0 ) /*row*/ );
|
||||
}
|
||||
|
||||
|
||||
|
@ -543,7 +543,7 @@ PlayableProxyModel::data( const QModelIndex& index, int role ) const
|
||||
return QVariant();
|
||||
if ( !m_headerStyle.contains( m_style ) )
|
||||
return QVariant();
|
||||
if ( index.column() < 0 )
|
||||
if ( index.column() < 0 || index.column() >= m_headerStyle[ m_style ].count() )
|
||||
return QVariant();
|
||||
|
||||
PlayableModel::Columns col = m_headerStyle[ m_style ].at( index.column() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user