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.
This commit is contained in:
con
2011-01-11 14:01:08 +01:00
parent 1c1acd0c4c
commit 4116504c3b
8 changed files with 93 additions and 50 deletions

View File

@@ -95,6 +95,8 @@ void PluginDetailsView::update(PluginSpec *spec)
QString depString = dep.name;
depString += QLatin1String(" (");
depString += dep.version;
if (dep.type == PluginDependency::Optional)
depString += QLatin1String(", optional");
depString += QLatin1Char(')');
depStrings.append(depString);
}