MCPcopy Create free account
hub / github.com/KDE/kdevelop / constraintsMatch

Function constraintsMatch

kdevplatform/shell/plugincontroller.cpp:104–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104bool constraintsMatch( const KPluginMetaData& info, const QVariantMap& constraints)
105{
106 for (auto it = constraints.begin(); it != constraints.end(); ++it) {
107 const auto property = info.rawData().value(it.key()).toVariant();
108
109 if (!property.isValid()) {
110 return false;
111 } else if (property.canConvert<QStringList>()) {
112 const QSet<QString> values = stringSet(property);
113 const QSet<QString> expected = stringSet(it.value());
114 if (!values.contains(expected)) {
115 return false;
116 }
117 } else if (it.value() != property) {
118 return false;
119 }
120 }
121 return true;
122}
123
124struct Dependency
125{

Callers 1

foreachEnabledPluginMethod · 0.85

Calls 8

stringSetFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
toVariantMethod · 0.45
valueMethod · 0.45
keyMethod · 0.45
isValidMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected