mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 21:57:41 +02:00
Prepend tracks to inbox, and avoid crash.
This commit is contained in:
@@ -98,9 +98,10 @@ DatabaseCommand_ShareTrack::postCommitHook()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
QMetaObject::invokeMethod( ViewManager::instance()->inboxModel(),
|
QMetaObject::invokeMethod( ViewManager::instance()->inboxModel(),
|
||||||
"appendQuery",
|
"insertQuery",
|
||||||
Qt::QueuedConnection,
|
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();
|
return QVariant();
|
||||||
if ( !m_headerStyle.contains( m_style ) )
|
if ( !m_headerStyle.contains( m_style ) )
|
||||||
return QVariant();
|
return QVariant();
|
||||||
if ( index.column() < 0 )
|
if ( index.column() < 0 || index.column() >= m_headerStyle[ m_style ].count() )
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
PlayableModel::Columns col = m_headerStyle[ m_style ].at( index.column() );
|
PlayableModel::Columns col = m_headerStyle[ m_style ].at( index.column() );
|
||||||
|
Reference in New Issue
Block a user