| 207 | } |
| 208 | |
| 209 | KJob* NativeAppLauncher::start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg) |
| 210 | { |
| 211 | Q_ASSERT(cfg); |
| 212 | if( !cfg ) |
| 213 | { |
| 214 | return nullptr; |
| 215 | } |
| 216 | if( launchMode == QLatin1String("execute") ) |
| 217 | { |
| 218 | auto nativeAppJob = new NativeAppJob( KDevelop::ICore::self()->runController(), cfg ); |
| 219 | QObject::connect(nativeAppJob, &NativeAppJob::killBeforeExecutingAgainChanged, KDevelop::ICore::self()->runController(), [cfg] (int newValue) { |
| 220 | auto cfgGroup = cfg->config(); |
| 221 | cfgGroup.writeEntry(ExecutePlugin::killBeforeExecutingAgain, newValue); |
| 222 | }); |
| 223 | |
| 224 | return makeJobWithDependency(nativeAppJob, executePlugin(), cfg); |
| 225 | } |
| 226 | qCWarning(PLUGIN_EXECUTE) << "Unknown launch mode " << launchMode << "for config:" << cfg->name(); |
| 227 | return nullptr; |
| 228 | } |
| 229 | |
| 230 | QStringList NativeAppLauncher::supportedModes() const |
| 231 | { |
nothing calls this directly
no test coverage detected