summaryrefslogtreecommitdiff
path: root/utils/themeeditor/editorwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/editorwindow.cpp')
-rw-r--r--utils/themeeditor/editorwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/themeeditor/editorwindow.cpp b/utils/themeeditor/editorwindow.cpp
index feaac6fe47..ada9ecd137 100644
--- a/utils/themeeditor/editorwindow.cpp
+++ b/utils/themeeditor/editorwindow.cpp
@@ -34,6 +34,11 @@ EditorWindow::EditorWindow(QWidget *parent) :
34 tree = new ParseTreeModel(ui->code->document()->toPlainText().toAscii()); 34 tree = new ParseTreeModel(ui->code->document()->toPlainText().toAscii());
35 ui->parseTree->setModel(tree); 35 ui->parseTree->setModel(tree);
36 36
37 /* Setting up the syntax highlighter */
38 highlighter = new SkinHighlighter(QColor(0,255,0), QColor(255,0,0),
39 QColor(0,0,255), QColor(150,150,150),
40 ui->code->document());
41
37 /* Connecting the buttons */ 42 /* Connecting the buttons */
38 QObject::connect(ui->code, SIGNAL(cursorPositionChanged()), 43 QObject::connect(ui->code, SIGNAL(cursorPositionChanged()),
39 this, SLOT(updateTree())); 44 this, SLOT(updateTree()));
@@ -50,7 +55,7 @@ void EditorWindow::updateTree()
50void EditorWindow::updateCode() 55void EditorWindow::updateCode()
51{ 56{
52 tree->genCode(); 57 tree->genCode();
53 ui->code->setDocument(new QTextDocument(tree->genCode())); 58 ui->code->document()->setPlainText(tree->genCode());
54} 59}
55 60
56EditorWindow::~EditorWindow() 61EditorWindow::~EditorWindow()