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

Method saveItemForRow

plugins/externalscript/externalscriptplugin.cpp:379–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void ExternalScriptPlugin::saveItemForRow(int row)
380{
381 const QModelIndex idx = m_model->index(row, 0);
382 Q_ASSERT(idx.isValid());
383
384 auto* item = dynamic_cast<ExternalScriptItem*>(m_model->item(row));
385 Q_ASSERT(item);
386
387 qCDebug(PLUGIN_EXTERNALSCRIPT) << "save extern script:" << item << idx;
388 KConfigGroup config = getConfig().group(item->key());
389 config.writeEntry("name", item->text());
390 config.writeEntry("command", item->command());
391 config.writeEntry("inputMode", ( uint ) item->inputMode());
392 config.writeEntry("outputMode", ( uint ) item->outputMode());
393 config.writeEntry("errorMode", ( uint ) item->errorMode());
394 config.writeEntry("saveMode", ( uint ) item->saveMode());
395 config.writeEntry("shortcuts", item->action()->shortcut().toString());
396 config.writeEntry("showOutput", item->showOutput());
397 config.writeEntry("filterMode", item->filterMode());
398 config.sync();
399}
400
401void ExternalScriptPlugin::setupKeys(int start, int end)
402{

Callers

nothing calls this directly

Calls 15

writeEntryMethod · 0.80
inputModeMethod · 0.80
outputModeMethod · 0.80
errorModeMethod · 0.80
saveModeMethod · 0.80
showOutputMethod · 0.80
filterModeMethod · 0.80
indexMethod · 0.45
isValidMethod · 0.45
itemMethod · 0.45
keyMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected