| 45 | } |
| 46 | |
| 47 | QUrl ExecuteScriptPlugin::script(ILaunchConfiguration* cfg, QString& err) const |
| 48 | { |
| 49 | QUrl script; |
| 50 | |
| 51 | if( !cfg ) |
| 52 | { |
| 53 | return script; |
| 54 | } |
| 55 | KConfigGroup grp = cfg->config(); |
| 56 | script = grp.readEntry( ExecuteScriptPlugin::executableEntry, QUrl() ); |
| 57 | |
| 58 | // Do not pass err to splitLocalFileLaunchConfigurationEntry(), because it may be nonempty from the beginning. |
| 59 | QString initiallyEmptyErrorMessage; |
| 60 | splitLocalFileLaunchConfigurationEntry( |
| 61 | *cfg, script, LaunchConfigurationEntryName{"script path", i18nc("path to a script", "script path")}, |
| 62 | initiallyEmptyErrorMessage); |
| 63 | if (initiallyEmptyErrorMessage.isEmpty()) { |
| 64 | return script; |
| 65 | } |
| 66 | |
| 67 | err = std::move(initiallyEmptyErrorMessage); |
| 68 | return {}; |
| 69 | } |
| 70 | |
| 71 | QString ExecuteScriptPlugin::remoteHost(ILaunchConfiguration* cfg, QString& err) const |
| 72 | { |
no test coverage detected