MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / pluginForOption

Method pluginForOption

lib/extensionsystem/pluginmanager.cpp:1274–1295  ·  view source on GitHub ↗

Look in argument descriptions of the specs for the option.

Source from the content-addressed store, hash-verified

1272
1273 // Look in argument descriptions of the specs for the option.
1274PluginSpec *PluginManagerPrivate::pluginForOption(const QString &option, bool *requiresArgument) const
1275{
1276 // Look in the plugins for an option
1277 typedef PluginSpec::PluginArgumentDescriptions PluginArgumentDescriptions;
1278
1279 *requiresArgument = false;
1280 const PluginSpecSet::const_iterator pcend = pluginSpecs.constEnd();
1281 for (PluginSpecSet::const_iterator pit = pluginSpecs.constBegin(); pit != pcend; ++pit) {
1282 PluginSpec *ps = *pit;
1283 const PluginArgumentDescriptions pargs = ps->argumentDescriptions();
1284 if (!pargs.empty()) {
1285 const PluginArgumentDescriptions::const_iterator acend = pargs.constEnd();
1286 for (PluginArgumentDescriptions::const_iterator ait = pargs.constBegin(); ait != acend; ++ait) {
1287 if (ait->name == option) {
1288 *requiresArgument = !ait->parameter.isEmpty();
1289 return ps;
1290 }
1291 }
1292 }
1293 }
1294 return 0;
1295}
1296
1297void PluginManagerPrivate::disablePluginIndirectly(PluginSpec *spec)
1298{

Callers 1

checkForPluginOptionMethod · 0.80

Calls 3

argumentDescriptionsMethod · 0.80
isEmptyMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected