Exemple #1
0
KPluginInfo PluginManager::pluginInfo( const Plugin *plugin ) const
{
    for ( PluginManagerPrivate::InfoToPluginMap::ConstIterator it = _kpmp->loadedPlugins.constBegin();
          it != _kpmp->loadedPlugins.constEnd(); ++it )
    {
        if ( it.value() == plugin )
            return it.key();
    }
    return KPluginInfo();
}
Exemple #2
0
PluginList PluginManager::loadedPlugins( const QString &category ) const
{
    PluginList result;

    for ( PluginManagerPrivate::InfoToPluginMap::ConstIterator it = _kpmp->loadedPlugins.constBegin();
          it != _kpmp->loadedPlugins.constEnd(); ++it )
    {
        if ( category.isEmpty() || it.key().category() == category )
            result.append( it.value() );
    }

    return result;
}