diff options
Diffstat (limited to 'sigtools/PluginLoader.cpp')
-rw-r--r-- | sigtools/PluginLoader.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sigtools/PluginLoader.cpp b/sigtools/PluginLoader.cpp index 44662a0e..c48076dc 100644 --- a/sigtools/PluginLoader.cpp +++ b/sigtools/PluginLoader.cpp @@ -37,9 +37,9 @@ K_GLOBAL_STATIC(PluginLoader::Private, loader) QStringList PluginLoader::availablePlugins(const QString& type, const bool forceLookup) { - if (forceLookup || !loader->m_available.contains(type)) + if (forceLookup) loader->refresh(type); - return loader->m_available[type].keys(); + return loader->services(type); } KService::Ptr PluginLoader::service(const QString& type, const QString& name) @@ -110,6 +110,15 @@ void PluginLoader::Private::refresh(const QString& type) } } +QStringList PluginLoader::Private::services(const QString& type) +{ + if (!m_available.contains(type)) + refresh(type); + if (m_available.contains(type)) + return m_available[type].keys(); + return QStringList(); +} + KService::Ptr PluginLoader::Private::service(const QString& type, const QString& name) { if (!m_available.contains(type)) |