| 377 | } |
| 378 | |
| 379 | void 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 | |
| 401 | void ExternalScriptPlugin::setupKeys(int start, int end) |
| 402 | { |
nothing calls this directly
no test coverage detected