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

Method setupKeys

plugins/externalscript/externalscriptplugin.cpp:401–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399}
400
401void ExternalScriptPlugin::setupKeys(int start, int end)
402{
403 QStringList keys = getConfig().groupList();
404
405 for (int row = start; row <= end; ++row) {
406 auto* const item = static_cast<ExternalScriptItem*>(m_model->item(row));
407
408 int nextSuffix = 2;
409 QString keyCandidate = item->text();
410 for (; keys.contains(keyCandidate); ++nextSuffix) {
411 keyCandidate = item->text() + QString::number(nextSuffix);
412 }
413
414 qCDebug(PLUGIN_EXTERNALSCRIPT) << "set key" << keyCandidate << "for" << item << item->command();
415 item->setKey(keyCandidate);
416 keys.push_back(keyCandidate);
417 }
418}
419
420#include "externalscriptplugin.moc"
421#include "moc_externalscriptplugin.cpp"

Callers

nothing calls this directly

Calls 6

setKeyMethod · 0.80
itemMethod · 0.45
textMethod · 0.45
containsMethod · 0.45
commandMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected