Changeset View
Changeset View
Standalone View
Standalone View
krusader/UserAction/kraction.cpp
Show First 20 Lines • Show All 278 Lines • ▼ Show 20 Line(s) | 274 | && MAIN_VIEW->terminalDock()->isInitialised()) { //send the commandline contents to the terminal emulator | |||
---|---|---|---|---|---|
279 | } | 279 | } | ||
280 | MAIN_VIEW->terminalDock()->sendInput(cmd + '\n'); | 280 | MAIN_VIEW->terminalDock()->sendInput(cmd + '\n'); | ||
281 | deleteLater(); | 281 | deleteLater(); | ||
282 | } | 282 | } | ||
283 | else { // will start a new process | 283 | else { // will start a new process | ||
284 | _proc = new KProcess(this); | 284 | _proc = new KProcess(this); | ||
285 | _proc->clearProgram(); // this clears the arglist too | 285 | _proc->clearProgram(); // this clears the arglist too | ||
286 | _proc->setWorkingDirectory(workingDir); | 286 | _proc->setWorkingDirectory(workingDir); | ||
287 | connect(_proc, QOverload<int, QProcess::ExitStatus>::of(&KProcess::finished), this, &KrActionProc::processExited); | 287 | connect(_proc, static_cast<void (KProcess::*)(int, QProcess::ExitStatus)>(&KProcess::finished), | ||
288 | this, &KrActionProc::processExited); | ||||
288 | 289 | | |||
289 | if (_action->execType() == KrAction::Normal || _action->execType() == KrAction::Terminal) { // not collect output | 290 | if (_action->execType() == KrAction::Normal || _action->execType() == KrAction::Terminal) { // not collect output | ||
290 | if (_action->execType() == KrAction::Terminal) { // run in terminal | 291 | if (_action->execType() == KrAction::Terminal) { // run in terminal | ||
291 | KConfigGroup group(krConfig, "UserActions"); | 292 | KConfigGroup group(krConfig, "UserActions"); | ||
292 | QString term = group.readEntry("Terminal", _UserActions_Terminal); | 293 | QString term = group.readEntry("Terminal", _UserActions_Terminal); | ||
293 | QStringList termArgs = KShell::splitArgs(term, KShell::TildeExpand); | 294 | QStringList termArgs = KShell::splitArgs(term, KShell::TildeExpand); | ||
294 | if (termArgs.isEmpty()) { | 295 | if (termArgs.isEmpty()) { | ||
295 | KMessageBox::error(nullptr, i18nc("Arg is a string containing the bad quoting.", | 296 | KMessageBox::error(nullptr, i18nc("Arg is a string containing the bad quoting.", | ||
▲ Show 20 Lines • Show All 404 Lines • Show Last 20 Lines |