summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-09-30 17:23:47 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-09-30 17:23:47 (GMT)
commit491413211a2f74a4c6b4112356dd6ea9c9484c92 (patch)
tree74054e35fdcd2fef478e14a31294d916f2c5a16a /Swift
parent75818abb4baa26649baf8d3bf6709aefcda7195f (diff)
downloadswift-491413211a2f74a4c6b4112356dd6ea9c9484c92.zip
swift-491413211a2f74a4c6b4112356dd6ea9c9484c92.tar.bz2
Avoid beautifying in console widget.
The beautifier is not representing the actual data sent, which is confusing.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtXMLConsoleWidget.cpp8
-rw-r--r--Swift/QtUI/QtXMLConsoleWidget.h3
2 files changed, 2 insertions, 9 deletions
diff --git a/Swift/QtUI/QtXMLConsoleWidget.cpp b/Swift/QtUI/QtXMLConsoleWidget.cpp
index 0c88ce6..e674df8 100644
--- a/Swift/QtUI/QtXMLConsoleWidget.cpp
+++ b/Swift/QtUI/QtXMLConsoleWidget.cpp
@@ -6,8 +6,6 @@
#include "QtXMLConsoleWidget.h"
-#include <Swiften/Client/XMLBeautifier.h>
-
#include <QCloseEvent>
#include <QTextEdit>
#include <QVBoxLayout>
@@ -51,11 +49,9 @@ QtXMLConsoleWidget::QtXMLConsoleWidget() {
setWindowTitle(tr("Debug Console"));
emit titleUpdated();
- beautifier = new XMLBeautifier(true, false);
}
QtXMLConsoleWidget::~QtXMLConsoleWidget() {
- delete beautifier;
}
void QtXMLConsoleWidget::showEvent(QShowEvent* event) {
@@ -79,11 +75,11 @@ void QtXMLConsoleWidget::closeEvent(QCloseEvent* event) {
}
void QtXMLConsoleWidget::handleDataRead(const SafeByteArray& data) {
- appendTextIfEnabled(std::string(tr("<!-- IN -->").toUtf8()) + "\n" + beautifier->beautify(safeByteArrayToString(data)) + "\n", QColor(33,98,33));
+ appendTextIfEnabled(std::string(tr("<!-- IN -->").toUtf8()) + "\n" + safeByteArrayToString(data) + "\n", QColor(33,98,33));
}
void QtXMLConsoleWidget::handleDataWritten(const SafeByteArray& data) {
- appendTextIfEnabled(std::string(tr("<!-- OUT -->").toUtf8()) + "\n" + beautifier->beautify(safeByteArrayToString(data)) + "\n", QColor(155,1,0));
+ appendTextIfEnabled(std::string(tr("<!-- OUT -->").toUtf8()) + "\n" + safeByteArrayToString(data) + "\n", QColor(155,1,0));
}
void QtXMLConsoleWidget::appendTextIfEnabled(const std::string& data, const QColor& color) {
diff --git a/Swift/QtUI/QtXMLConsoleWidget.h b/Swift/QtUI/QtXMLConsoleWidget.h
index c22251f..912ad90 100644
--- a/Swift/QtUI/QtXMLConsoleWidget.h
+++ b/Swift/QtUI/QtXMLConsoleWidget.h
@@ -14,8 +14,6 @@ class QCheckBox;
class QColor;
namespace Swift {
- class XMLBeautifier;
-
class QtXMLConsoleWidget : public QtTabbable, public XMLConsoleWidget {
Q_OBJECT
@@ -38,6 +36,5 @@ namespace Swift {
private:
QTextEdit* textEdit;
QCheckBox* enabled;
- XMLBeautifier* beautifier;
};
}