void AccountManager::loadFromConfig() { m_creds = new CredentialsManager( this ); ConfigStorage* localCS = new LocalConfigStorage( this ); m_configStorageById.insert( localCS->id(), localCS ); QList< QObject* > configStoragePlugins = Tomahawk::Utils::PluginLoader( "configstorage" ).loadPlugins().values(); foreach( QObject* plugin, configStoragePlugins ) { ConfigStorage* cs = qobject_cast< ConfigStorage* >( plugin ); if ( !cs ) continue; m_configStorageById.insert( cs->id(), cs ); }