| 258 | } |
| 259 | |
| 260 | void Scratchpad::addFileToModel(const QFileInfo& fileInfo) |
| 261 | { |
| 262 | auto* const item = new QStandardItem(m_iconProvider.icon(fileInfo), fileInfo.fileName()); |
| 263 | item->setData(fileInfo.filePath(), FullPathRole); |
| 264 | const auto command = commandForScratch(fileInfo); |
| 265 | item->setData(command, RunCommandRole); |
| 266 | scratchCommands().writeEntry(item->text(), item->data(RunCommandRole)); |
| 267 | m_model->appendRow(item); |
| 268 | } |
| 269 | |
| 270 | void Scratchpad::setCommand(const QModelIndex& index, const QString& command) |
| 271 | { |
nothing calls this directly
no test coverage detected