diff options
author | con <[email protected]> | 2011-01-11 14:01:08 +0100 |
---|---|---|
committer | con <[email protected]> | 2011-01-11 15:08:05 +0100 |
commit | 4116504c3b5813d9fcbef25f43765303e88148cd (patch) | |
tree | 354547605feee0d6e172d22fda2de97d9eaea7ab /src/libs/extensionsystem/pluginview.cpp | |
parent | 1c1acd0c4cee350d65df8c4b439c8b19932c6f6d (diff) |
Allow optional plugin dependencies.
Adds a 'type' attribute to the 'dependency' tag, with possible values
'required' and 'optional'.
Optional dependencies may not be linked against. You'll need to use the
new dynamic methods in plugin manager (retrieving objects and calling
methods by name) if you want to access functionality of optional
dependencies.
Diffstat (limited to 'src/libs/extensionsystem/pluginview.cpp')
-rw-r--r-- | src/libs/extensionsystem/pluginview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libs/extensionsystem/pluginview.cpp b/src/libs/extensionsystem/pluginview.cpp index 38d9d8b8240..2fa382706bd 100644 --- a/src/libs/extensionsystem/pluginview.cpp +++ b/src/libs/extensionsystem/pluginview.cpp @@ -351,7 +351,12 @@ void PluginView::updatePluginDependencies() if (m_whitelist.contains(spec->name())) continue; - foreach(const PluginSpec *depSpec, spec->dependencySpecs()) { + QHashIterator<PluginDependency, PluginSpec *> it(spec->dependencySpecs()); + while (it.hasNext()) { + it.next(); + if (it.key().type == PluginDependency::Optional) + continue; + PluginSpec *depSpec = it.value(); if (!depSpec->isEnabled() || depSpec->isDisabledIndirectly()) { disableIndirectly = true; break; |