mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-26 21:03:31 +01:00
Create dyn playlist with type always
This commit is contained in:
parent
a78e3d996a
commit
26be23fdd5
@ -31,7 +31,7 @@ public:
|
||||
qDebug() << "***********" << Q_FUNC_INFO << v;
|
||||
using namespace Tomahawk;
|
||||
|
||||
DynamicPlaylist* p = new DynamicPlaylist( source() );
|
||||
DynamicPlaylist* p = new DynamicPlaylist( source(), v.toMap().value( "type", QString() ).toString() );
|
||||
QJson::QObjectHelper::qvariant2qobject( v.toMap(), p );
|
||||
m_playlist = dynplaylist_ptr( p );
|
||||
}
|
||||
|
@ -27,10 +27,11 @@
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
DynamicPlaylist::DynamicPlaylist(const Tomahawk::source_ptr& author)
|
||||
DynamicPlaylist::DynamicPlaylist(const Tomahawk::source_ptr& author, const QString& type )
|
||||
: Playlist(author)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "JSON";
|
||||
m_generator = geninterface_ptr( GeneratorFactory::create( type ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
// these need to exist and be public for the json serialization stuff
|
||||
// you SHOULD NOT call them. They are used for an alternate CTOR method from json.
|
||||
// maybe friend QObjectHelper and make them private?
|
||||
explicit DynamicPlaylist( const source_ptr& author );
|
||||
explicit DynamicPlaylist( const source_ptr& author, const QString& type );
|
||||
void setMode( int mode );
|
||||
void setType( const QString& type ) { /** TODO */; }
|
||||
void setGenerator( const geninterface_ptr& gen_ptr );
|
||||
|
Loading…
x
Reference in New Issue
Block a user