diff options
| author | Tannin <devnull@localhost> | 2014-09-10 20:37:17 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-09-10 20:37:17 +0200 |
| commit | 19cb2d4076d3515fa490fce7fbd339e92c7c3adf (patch) | |
| tree | 11af166f75b1013b441be67d5d321db298e72d85 /src/pluginlist.cpp | |
| parent | 5aa5c90d39f46cfcf8d169b4087f30fcccd89640 (diff) | |
plugins can now query the list of masters for a plugin
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 43246b55..ff370fa4 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -667,6 +667,20 @@ bool PluginList::isMaster(const QString &name) const }
}
+QStringList PluginList::masters(const QString &name) const
+{
+ auto iter = m_ESPsByName.find(name.toLower());
+ if (iter == m_ESPsByName.end()) {
+ return QStringList();
+ } else {
+ QStringList result;
+ foreach (const QString &master, m_ESPs[iter->second].m_Masters) {
+ result.append(master);
+ }
+ return result;
+ }
+}
+
QString PluginList::origin(const QString &name) const
{
auto iter = m_ESPsByName.find(name.toLower());
|
