1
0
Fork 0
forked from len0rd/rockbox

Theme Editor: Switched error highlighting to the line numbers

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26785 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-06-11 19:03:49 +00:00
parent 3fec40194c
commit 0c38353869
3 changed files with 13 additions and 13 deletions

View file

@ -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
{