mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Made DatabaseCommand_CreateDynamicPlaylist and
DatabaseCommand_CreatePlaylist independent of ViewManager
This commit is contained in:
committed by
Dominik Schmidt
parent
4949e787a3
commit
811c0e618d
@@ -114,14 +114,13 @@ DatabaseCommand_CreateDynamicPlaylist::postCommitHook()
|
|||||||
qDebug() << Q_FUNC_INFO << "..reporting..";
|
qDebug() << Q_FUNC_INFO << "..reporting..";
|
||||||
if( m_playlist.isNull() ) {
|
if( m_playlist.isNull() ) {
|
||||||
source_ptr src = source();
|
source_ptr src = source();
|
||||||
#ifndef ENABLE_HEADLESS
|
|
||||||
QMetaObject::invokeMethod( ViewManager::instance(),
|
Tomahawk::dynplaylist_ptr p = Tomahawk::dynplaylist_ptr( new Tomahawk::DynamicPlaylist( src, m_v.toMap().value( "type", QString() ).toString() ) );
|
||||||
"createDynamicPlaylist",
|
QJson::QObjectHelper::qvariant2qobject( m_v.toMap(), p.data() );
|
||||||
Qt::BlockingQueuedConnection,
|
p->reportCreated( p );
|
||||||
QGenericArgument( "Tomahawk::source_ptr", (const void*)&src ),
|
}
|
||||||
Q_ARG( QVariant, m_v ) );
|
else
|
||||||
#endif
|
{
|
||||||
} else {
|
|
||||||
m_playlist->reportCreated( m_playlist );
|
m_playlist->reportCreated( m_playlist );
|
||||||
}
|
}
|
||||||
if( source()->isLocal() )
|
if( source()->isLocal() )
|
||||||
|
@@ -82,13 +82,10 @@ DatabaseCommand_CreatePlaylist::postCommitHook()
|
|||||||
if ( m_playlist.isNull() )
|
if ( m_playlist.isNull() )
|
||||||
{
|
{
|
||||||
source_ptr src = source();
|
source_ptr src = source();
|
||||||
#ifndef ENABLE_HEADLESS
|
|
||||||
QMetaObject::invokeMethod( ViewManager::instance(),
|
Tomahawk::playlist_ptr p = Tomahawk::playlist_ptr( new Tomahawk::Playlist( src ) );
|
||||||
"createPlaylist",
|
QJson::QObjectHelper::qvariant2qobject( m_v.toMap(), p.data() );
|
||||||
Qt::BlockingQueuedConnection,
|
p->reportCreated( p );
|
||||||
QGenericArgument( "Tomahawk::source_ptr", (const void*)&src ),
|
|
||||||
Q_ARG( QVariant, m_v ) );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user