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

Method executeCommand

plugins/externalscript/externalscriptplugin.cpp:287–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287bool 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
304QString ExternalScriptPlugin::executeCommandSync(const QString& command, const QString& workingDirectory) const
305{

Callers

nothing calls this directly

Calls 7

setVerbosityMethod · 0.80
registerJobMethod · 0.80
runControllerMethod · 0.80
QUrlClass · 0.50
setCommandMethod · 0.45
setWorkingDirectoryMethod · 0.45

Tested by

no test coverage detected