~ubuntu-branches/ubuntu/lucid/kdebase/lucid-updates

« back to all changes in this revision

Viewing changes to apps/dolphin/src/panels/terminal/terminalpanel.cpp

  • Committer: Package Import Robot
  • Author(s): Jamie Strandboge
  • Date: 2011-11-08 16:17:32 UTC
  • mfrom: (269.1.1 lucid-proposed)
  • Revision ID: package-import@ubuntu.com-20111108161732-0bo7tg4j20u2z83f
Tags: 4:4.4.5-0ubuntu1.2
No change rebuild for security. This is needed to build kdeutils in
the security pocket.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
        // The TerminalV2 interface does not provide a way to delete the
122
122
        // current line before sending a new input. This is mandatory,
123
123
        // otherwise sending a 'cd x' to a existing 'rm -rf *' might
124
 
        // result in data loss. As workaround backspaces are send...
125
 
        QString clearLine;
126
 
        for (int i = 0; i < 256; ++i) {
127
 
            clearLine.append(QChar(8));
128
 
        }
129
 
        m_terminal->sendInput(clearLine);
 
124
        // result in data loss. As workaround Ctrl+C is send.
 
125
        QString cancel;
 
126
        cancel.append(QChar(3));
 
127
        cancel.append(QChar('c'));
 
128
        m_terminal->sendInput(cancel);
130
129
    }
131
130
 
132
131
    m_terminal->sendInput("cd " + KShell::quoteArg(dir) + '\n');