diff --git a/src/plugins/coreplugin/featureprovider.h b/src/plugins/coreplugin/featureprovider.h index 9114cb1a45c..27291579b47 100644 --- a/src/plugins/coreplugin/featureprovider.h +++ b/src/plugins/coreplugin/featureprovider.h @@ -77,6 +77,11 @@ public: return *this; } + bool isEmpty() const + { + return QSet::isEmpty(); + } + bool contains(const Feature &feature) const { return QSet::contains(feature); @@ -92,6 +97,11 @@ public: QSet::remove(feature); } + void remove(const FeatureSet &features) + { + QSet::subtract(features); + } + FeatureSet operator|(const Feature &feature) const { FeatureSet copy = *this; @@ -129,6 +139,14 @@ public: stringList.append(feature.toString()); return stringList; } + + static FeatureSet fromStringList(const QStringList &list) + { + FeatureSet features; + foreach (const QString &i, list) + features |= Feature(Id::fromString(i)); + return features; + } }; } // namespace Core