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

Method execute

kdevplatform/shell/runcontroller.cpp:414–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414KJob* RunController::execute(const QString& runMode, ILaunchConfiguration* launch)
415{
416 if( !launch )
417 {
418 qCDebug(SHELL) << "execute called without launch config!";
419 return nullptr;
420 }
421 auto* run = static_cast<LaunchConfiguration*>(launch);
422 //TODO: Port to launch framework, probably needs to be part of the launcher
423 //if(!run.dependencies().isEmpty())
424 // ICore::self()->documentController()->saveAllDocuments(IDocument::Silent);
425
426 //foreach(KJob* job, run.dependencies())
427 //{
428 // jobs.append(job);
429 //}
430
431 qCDebug(SHELL) << "mode:" << runMode;
432 QString launcherId = run->launcherForMode( runMode );
433 qCDebug(SHELL) << "launcher id:" << launcherId;
434
435 ILauncher* launcher = run->type()->launcherForId( launcherId );
436
437 if( !launcher ) {
438 const QString messageText = i18n("The current launch configuration does not support the '%1' mode.", runMode);
439 auto* message = new Sublime::Message(messageText, Sublime::Message::Error);
440 ICore::self()->uiController()->postMessage(message);
441 return nullptr;
442 }
443
444 KJob* launchJob = launcher->start(runMode, run);
445 registerJob(launchJob);
446 return launchJob;
447}
448
449void RunController::setupActions()
450{

Callers 2

launchAsMethod · 0.45
mainFunction · 0.45

Calls 6

launcherForModeMethod · 0.80
launcherForIdMethod · 0.80
uiControllerMethod · 0.80
typeMethod · 0.45
postMessageMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected