mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-19 23:41:51 +02:00
* Check whether GeneratorFactory returned a valid control.
This commit is contained in:
parent
220ae243dc
commit
3d5dd801b1
@ -539,11 +539,15 @@ QList< dyncontrol_ptr >
|
||||
DynamicPlaylist::variantsToControl( const QList< QVariantMap >& controlsV )
|
||||
{
|
||||
QList<dyncontrol_ptr> realControls;
|
||||
foreach( QVariantMap controlV, controlsV ) {
|
||||
foreach( QVariantMap controlV, controlsV )
|
||||
{
|
||||
dyncontrol_ptr control = GeneratorFactory::createControl( controlV.value( "type" ).toString(), controlV.value( "selectedType" ).toString() );
|
||||
// qDebug() << "Creating control with data:" << controlV;
|
||||
QJson::QObjectHelper::qvariant2qobject( controlV, control.data() );
|
||||
realControls << control;
|
||||
if ( control )
|
||||
{
|
||||
QJson::QObjectHelper::qvariant2qobject( controlV, control.data() );
|
||||
realControls << control;
|
||||
}
|
||||
}
|
||||
return realControls;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user