| 285 | } |
| 286 | |
| 287 | bool ExternalScriptPlugin::executeCommand(const QString& command, const QString& workingDirectory) const |
| 288 | { |
| 289 | auto* item = new ExternalScriptItem; |
| 290 | item->setCommand(command); |
| 291 | item->setWorkingDirectory(workingDirectory); |
| 292 | item->setPerformParameterReplacement(false); |
| 293 | qCDebug(PLUGIN_EXTERNALSCRIPT) << "executing command " << command << " in dir " << workingDirectory << |
| 294 | " as external script"; |
| 295 | auto* job = |
| 296 | new ExternalScriptJobOwningItem(item, QUrl(), const_cast<ExternalScriptPlugin*>(this)); |
| 297 | // When a command is executed, for example through the terminal, we don't want the command output to be risen |
| 298 | job->setVerbosity(KDevelop::OutputJob::Silent); |
| 299 | |
| 300 | KDevelop::ICore::self()->runController()->registerJob(job); |
| 301 | return true; |
| 302 | } |
| 303 | |
| 304 | QString ExternalScriptPlugin::executeCommandSync(const QString& command, const QString& workingDirectory) const |
| 305 | { |
nothing calls this directly
no test coverage detected