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) :
tree = new ParseTreeModel(ui->code->document()->toPlainText().toAscii());
ui->parseTree->setModel(tree);
+ /* Setting up the syntax highlighter */
+ highlighter = new SkinHighlighter(QColor(0,255,0), QColor(255,0,0),
+ QColor(0,0,255), QColor(150,150,150),
+ ui->code->document());
+
/* Connecting the buttons */
QObject::connect(ui->code, SIGNAL(cursorPositionChanged()),
this, SLOT(updateTree()));
@@ -50,7 +55,7 @@ void EditorWindow::updateTree()
void EditorWindow::updateCode()
{
tree->genCode();
- ui->code->setDocument(new QTextDocument(tree->genCode()));
+ ui->code->document()->setPlainText(tree->genCode());
}
EditorWindow::~EditorWindow()