1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02:00

Fix ghost ScriptCollections on config change and potential crashes.

This commit is contained in:
Teo Mrnjavac
2013-03-05 18:07:49 +01:00
parent 5364dfaf40
commit dbf340f557

View File

@@ -912,6 +912,11 @@ QtScriptResolver::loadCollections()
QString prettyname = collectionInfo.value( "prettyname" ).toString();
QString desc = collectionInfo.value( "description" ).toString();
foreach ( Tomahawk::collection_ptr collection, m_collections )
{
emit collectionRemoved( collection );
}
m_collections.clear();
// at this point we assume that all the tracks browsable through a resolver belong to the local source
Tomahawk::ScriptCollection* sc = new Tomahawk::ScriptCollection( SourceList::instance()->getLocal(), this );