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.zip rockbox-0c383538693f04d1e5bc81f4af6a6e9585296bcb.tar.gz rockbox-0c383538693f04d1e5bc81f4af6a6e9585296bcb.tar.bz2 rockbox-0c383538693f04d1e5bc81f4af6a6e9585296bcb.tar.xz | |
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 '')
| -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 f7c902f..b67c70d 100644 --- a/utils/themeeditor/skindocument.cpp +++ b/utils/themeeditor/skindocument.cpp @@ -166,6 +166,7 @@ void SkinDocument::settingsChanged() void SkinDocument::codeChanged() { + editor->clearErrors(); parseStatus = model->changeTree(editor->document()-> toPlainText().toAscii()); statusLabel->setText(parseStatus); @@ -173,17 +174,7 @@ void SkinDocument::codeChanged() /* Highlighting if an error was found */ if(skin_error_line() > 0) { - QList<QTextEdit::ExtraSelection> highlight; - QTextEdit::ExtraSelection error; - - /* Finding the apropriate line */ - error.cursor = QTextCursor(editor->document()-> - findBlockByNumber(skin_error_line() - 1)); - error.format = errorColor; - highlight.append(error); - - editor->setExtraSelections(highlight); - + editor->addError(skin_error_line()); } else { |