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

Method suggestionTriggered

plugins/executeplasmoid/plasmoidexecutionconfig.cpp:294–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294void PlasmoidExecutionConfigType::suggestionTriggered()
295{
296 auto* action = qobject_cast<QAction*>(sender());
297 auto* p = action->property("project").value<KDevelop::IProject*>();
298 QString relUrl = action->property("url").toString();
299
300 KDevelop::ILauncher* launcherInstance = launchers().at( 0 );
301 QPair<QString,QString> launcher = qMakePair( launcherInstance->supportedModes().at(0), launcherInstance->id() );
302
303 QString name = relUrl.mid(relUrl.lastIndexOf(QLatin1Char('/'))+1);
304 KDevelop::ILaunchConfiguration* config = KDevelop::ICore::self()->runController()->createLaunchConfiguration(this, launcher, p, name);
305 KConfigGroup cfg = config->config();
306 cfg.writeEntry("PlasmoidIdentifier", relUrl);
307 emit signalAddLaunchConfiguration(config);
308}
309
310#include "moc_plasmoidexecutionconfig.cpp"

Callers

nothing calls this directly

Calls 10

propertyMethod · 0.80
midMethod · 0.80
runControllerMethod · 0.80
writeEntryMethod · 0.80
toStringMethod · 0.45
atMethod · 0.45
supportedModesMethod · 0.45
idMethod · 0.45
configMethod · 0.45

Tested by

no test coverage detected