mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 01:24:11 +02:00
Fix ghost ScriptCollections on config change and potential crashes.
This commit is contained in:
@@ -912,6 +912,11 @@ QtScriptResolver::loadCollections()
|
|||||||
QString prettyname = collectionInfo.value( "prettyname" ).toString();
|
QString prettyname = collectionInfo.value( "prettyname" ).toString();
|
||||||
QString desc = collectionInfo.value( "description" ).toString();
|
QString desc = collectionInfo.value( "description" ).toString();
|
||||||
|
|
||||||
|
foreach ( Tomahawk::collection_ptr collection, m_collections )
|
||||||
|
{
|
||||||
|
emit collectionRemoved( collection );
|
||||||
|
}
|
||||||
|
|
||||||
m_collections.clear();
|
m_collections.clear();
|
||||||
// at this point we assume that all the tracks browsable through a resolver belong to the local source
|
// 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 );
|
Tomahawk::ScriptCollection* sc = new Tomahawk::ScriptCollection( SourceList::instance()->getLocal(), this );
|
||||||
|
Reference in New Issue
Block a user