diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-11 19:03:49 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-11 19:03:49 +0000 |
commit | 0c383538693f04d1e5bc81f4af6a6e9585296bcb (patch) | |
tree | d024070233b007b1e1c232c600f9b17009b2bd2e /utils/themeeditor/skindocument.cpp | |
parent | 3fec40194c2c07a1693536f08cb9214cec390cf9 (diff) | |
download | rockbox-0c383538693f04d1e5bc81f4af6a6e9585296bcb.tar.gz rockbox-0c383538693f04d1e5bc81f4af6a6e9585296bcb.zip |
Theme Editor: Switched error highlighting to the line numbers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26785 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/skindocument.cpp')
-rw-r--r-- | utils/themeeditor/skindocument.cpp | 13 |
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 | ||
167 | void SkinDocument::codeChanged() | 167 | void 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 | { |