Commit cad7d436 authored by hjk's avatar hjk
Browse files

debugger: use QPlainTextEdit instead of QTextEdit for output pane

parent 694215ae
......@@ -60,11 +60,11 @@ using namespace Debugger::Internal;
//
/////////////////////////////////////////////////////////////////////
class DebuggerPane : public QTextEdit
class DebuggerPane : public QPlainTextEdit
{
public:
DebuggerPane(QWidget *parent)
: QTextEdit(parent)
: QPlainTextEdit(parent)
{
m_clearContentsAction = new QAction(this);
m_clearContentsAction->setText("Clear contents");
......@@ -133,7 +133,7 @@ private:
else if (ev->modifiers() == Qt::ControlModifier && ev->key() == Qt::Key_R)
emit clearContentsRequested();
else
QTextEdit::keyPressEvent(ev);
QPlainTextEdit::keyPressEvent(ev);
}
void mouseDoubleClickEvent(QMouseEvent *ev)
......@@ -163,13 +163,13 @@ private:
void focusInEvent(QFocusEvent *ev)
{
emit statusMessageRequested("Type Ctrl-<Return> to execute a line.", -1);
QTextEdit::focusInEvent(ev);
QPlainTextEdit::focusInEvent(ev);
}
void focusOutEvent(QFocusEvent *ev)
{
emit statusMessageRequested(QString(), -1);
QTextEdit::focusOutEvent(ev);
QPlainTextEdit::focusOutEvent(ev);
}
QAction *m_commandExecutionAction;
......@@ -274,7 +274,7 @@ void DebuggerOutputWindow::showOutput(const QString &prefix, const QString &outp
const int n = 3000;
if (line.size() > n)
line = line.left(n) + " [...] <cut off>";
m_combinedText->append(prefix + line);
m_combinedText->appendPlainText(prefix + line);
}
QTextCursor cursor = m_combinedText->textCursor();
cursor.movePosition(QTextCursor::End);
......@@ -285,7 +285,7 @@ void DebuggerOutputWindow::showOutput(const QString &prefix, const QString &outp
void DebuggerOutputWindow::showInput(const QString &prefix, const QString &input)
{
Q_UNUSED(prefix);
m_inputText->append(input);
m_inputText->appendPlainText(input);
QTextCursor cursor = m_inputText->textCursor();
cursor.movePosition(QTextCursor::End);
m_inputText->setTextCursor(cursor);
......
......@@ -32,7 +32,7 @@
#include <QtGui/QLineEdit>
#include <QtGui/QSplitter>
#include <QtGui/QTextEdit>
#include <QtGui/QPlainTextEdit>
#include <QtGui/QWidget>
namespace Debugger {
......@@ -71,8 +71,8 @@ private slots:
void onReturnPressed();
private:
QTextEdit *m_combinedText; // combined input/output
QTextEdit *m_inputText; // scriptable input alone
QPlainTextEdit *m_combinedText; // combined input/output
QPlainTextEdit *m_inputText; // scriptable input alone
QLineEdit *m_commandEdit;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment