| 219 | entryName.untranslatable << "for the launch configuration" << launchConfiguration.name() |
| 220 | |
| 221 | QStringList splitLaunchConfigurationEntry(const ILaunchConfiguration& launchConfiguration, const QString& entryText, |
| 222 | const LaunchConfigurationEntryName& entryName, QString& errorMessage) |
| 223 | { |
| 224 | KShell::Errors errorCode; |
| 225 | auto ret = KShell::splitArgs(entryText, KShell::TildeExpand | KShell::AbortOnMeta, &errorCode); |
| 226 | |
| 227 | switch (errorCode) { |
| 228 | case KShell::NoError: |
| 229 | return ret; |
| 230 | case KShell::BadQuoting: |
| 231 | errorMessage = i18nc("%1 - entry name, e.g. 'arguments' or 'executable path'; %2 - launch configuration name", |
| 232 | "There is a quoting error in the %1 for the launch configuration '%2'. Aborting start.", |
| 233 | entryName.translatable, launchConfiguration.name()); |
| 234 | qCWarning(UTIL) << "quoting error in the" << ENTRY_NAME_FOR_LAUNCH_CONFIGURATION; |
| 235 | return {}; |
| 236 | case KShell::FoundMeta: |
| 237 | errorMessage = i18nc("%1 - entry name, e.g. 'arguments' or 'executable path'; %2 - launch configuration name", |
| 238 | "A shell meta character was included in the %1 for the launch configuration '%2', " |
| 239 | "this is not supported currently. Aborting start.", |
| 240 | entryName.translatable, launchConfiguration.name()); |
| 241 | qCWarning(UTIL) << "shell meta character in the" << ENTRY_NAME_FOR_LAUNCH_CONFIGURATION; |
| 242 | return {}; |
| 243 | } |
| 244 | |
| 245 | errorMessage = |
| 246 | i18nc("%1 - entry name, e.g. 'arguments' or 'executable path'; %2 - error code; %3 - launch configuration name", |
| 247 | "KShell::splitArgs(<the %1>) reported an unknown error code %2 " |
| 248 | "for the launch configuration '%3'. Aborting start.", |
| 249 | entryName.translatable, errorCode, launchConfiguration.name()); |
| 250 | qCWarning(UTIL) << "unknown error code" << errorCode << "reported for the" << ENTRY_NAME_FOR_LAUNCH_CONFIGURATION; |
| 251 | return {}; |
| 252 | } |
| 253 | |
| 254 | static QStringList splitLaunchConfigurationEntryToNonemptyList(const ILaunchConfiguration& launchConfiguration, |
| 255 | const QString& entryText, |
no test coverage detected