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

Function hasMandatoryProperties

kdevplatform/shell/plugincontroller.cpp:77–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool hasMandatoryProperties( const KPluginMetaData& info )
78{
79 QString mode = info.value(KEY_Mode());
80 if (mode.isEmpty()) {
81 return false;
82 }
83
84 // when the plugin is installed into the versioned plugin path, it's good to go
85 if (info.fileName().contains(QLatin1String("/kdevplatform/" QT_STRINGIFY(KDEVELOP_PLUGIN_VERSION) "/"))) {
86 return true;
87 }
88
89 // the version property is only required when the plugin is not installed into the right directory
90 QVariant version = info.rawData().value(KEY_Version()).toVariant();
91 if (version.isValid() && version.value<int>() == KDEVELOP_PLUGIN_VERSION) {
92 return true;
93 }
94
95 return false;
96}
97
98inline QSet<QString> stringSet(const QVariant& variant)
99{

Callers 1

loadPluginInternalMethod · 0.85

Calls 8

KEY_ModeFunction · 0.85
KEY_VersionFunction · 0.85
valueMethod · 0.45
isEmptyMethod · 0.45
containsMethod · 0.45
fileNameMethod · 0.45
toVariantMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected