Look in argument descriptions of the specs for the option.
| 1272 | |
| 1273 | // Look in argument descriptions of the specs for the option. |
| 1274 | PluginSpec *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 | |
| 1297 | void PluginManagerPrivate::disablePluginIndirectly(PluginSpec *spec) |
| 1298 | { |
no test coverage detected