summaryrefslogtreecommitdiff
path: root/utils/themeeditor/skindocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/skindocument.cpp')
-rw-r--r--utils/themeeditor/skindocument.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/utils/themeeditor/skindocument.cpp b/utils/themeeditor/skindocument.cpp
index f7c902f30f..b67c70db61 100644
--- a/utils/themeeditor/skindocument.cpp
+++ b/utils/themeeditor/skindocument.cpp
@@ -166,6 +166,7 @@ void SkinDocument::settingsChanged()
166 166
167void SkinDocument::codeChanged() 167void SkinDocument::codeChanged()
168{ 168{
169 editor->clearErrors();
169 parseStatus = model->changeTree(editor->document()-> 170 parseStatus = model->changeTree(editor->document()->
170 toPlainText().toAscii()); 171 toPlainText().toAscii());
171 statusLabel->setText(parseStatus); 172 statusLabel->setText(parseStatus);
@@ -173,17 +174,7 @@ void SkinDocument::codeChanged()
173 /* Highlighting if an error was found */ 174 /* Highlighting if an error was found */
174 if(skin_error_line() > 0) 175 if(skin_error_line() > 0)
175 { 176 {
176 QList<QTextEdit::ExtraSelection> highlight; 177 editor->addError(skin_error_line());
177 QTextEdit::ExtraSelection error;
178
179 /* Finding the apropriate line */
180 error.cursor = QTextCursor(editor->document()->
181 findBlockByNumber(skin_error_line() - 1));
182 error.format = errorColor;
183 highlight.append(error);
184
185 editor->setExtraSelections(highlight);
186
187 } 178 }
188 else 179 else
189 { 180 {