forked from qt-creator/qt-creator
PluginView: Functional style dependency list creation
Change-Id: I08c6aeb8be55e73a9d8e55e264046afc19c9e4b9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -146,6 +146,23 @@ bool PluginDependency::operator==(const PluginDependency &other) const
|
||||
return name == other.name && version == other.version && type == other.type;
|
||||
}
|
||||
|
||||
static QString typeString(PluginDependency::Type type)
|
||||
{
|
||||
switch (type) {
|
||||
case PluginDependency::Required:
|
||||
return QString();
|
||||
case PluginDependency::Optional:
|
||||
return ", optional";
|
||||
case PluginDependency::Test:
|
||||
return ", test";
|
||||
}
|
||||
}
|
||||
|
||||
QString PluginDependency::toString() const
|
||||
{
|
||||
return name + " (" + version + typeString(type) + ")";
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user