mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Check whether GeneratorFactory returned a valid control.
This commit is contained in:
@@ -539,12 +539,16 @@ 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;
|
||||
if ( control )
|
||||
{
|
||||
QJson::QObjectHelper::qvariant2qobject( controlV, control.data() );
|
||||
realControls << control;
|
||||
}
|
||||
}
|
||||
return realControls;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user