| 159 | } |
| 160 | |
| 161 | void Scratchpad::runScratch(const QModelIndex& index) |
| 162 | { |
| 163 | qCDebug(PLUGIN_SCRATCHPAD) << "run" << index.data().toString(); |
| 164 | |
| 165 | auto command = index.data(RunCommandRole).toString(); |
| 166 | command.replace(QLatin1String("$f"), index.data(FullPathRole).toString()); |
| 167 | if (!command.isEmpty()) { |
| 168 | auto* job = new ScratchpadJob(command, index.data().toString(), this); |
| 169 | core()->runController()->registerJob(job); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | void Scratchpad::removeScratch(const QModelIndex& index) |
| 174 | { |
no test coverage detected