diff --git a/dolphin/src/panels/terminal/terminalpanel.cpp b/dolphin/src/panels/terminal/terminalpanel.cpp index 3c9c5bd758..cee1d64270 100644 --- a/dolphin/src/panels/terminal/terminalpanel.cpp +++ b/dolphin/src/panels/terminal/terminalpanel.cpp @@ -19,6 +19,8 @@ #include "terminalpanel.h" +#include + #include #include #include @@ -115,11 +117,8 @@ void TerminalPanel::sendCdToTerminal(const QString& dir) // The TerminalV2 interface does not provide a way to delete the // current line before sending a new input. This is mandatory, // otherwise sending a 'cd x' to a existing 'rm -rf *' might - // result in data loss. As workaround Ctrl+C is send. - QString cancel; - cancel.append(QChar(3)); - cancel.append(QChar('c')); - m_terminal->sendInput(cancel); + // result in data loss. As workaround SIGINT is send. + kill(m_terminal->terminalProcessId(), SIGINT); } m_terminal->sendInput("cd " + KShell::quoteArg(dir) + '\n');