summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/parsetreemodel.cpp
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-07 20:29:46 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-07 20:29:46 +0000
commit0e44ce9bedbea1244ef971b48f38a9c48eecf0f5 (patch)
tree79b074202ee1d425abbfb5bb2449701a5fba48bc /utils/themeeditor/parsetreemodel.cpp
parentbd2ba8068c6cbc58299e98896abd08301a51214f (diff)
downloadrockbox-0e44ce9bedbea1244ef971b48f38a9c48eecf0f5.tar.gz
rockbox-0e44ce9bedbea1244ef971b48f38a9c48eecf0f5.tar.bz2
rockbox-0e44ce9bedbea1244ef971b48f38a9c48eecf0f5.zip
Theme Editor: Changed anged error reporting method in parser, added error messages to status bar in editor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26672 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/parsetreemodel.cpp')
-rw-r--r--utils/themeeditor/parsetreemodel.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/utils/themeeditor/parsetreemodel.cpp b/utils/themeeditor/parsetreemodel.cpp
index 8da0c26ef3..787122d02d 100644
--- a/utils/themeeditor/parsetreemodel.cpp
+++ b/utils/themeeditor/parsetreemodel.cpp
@@ -55,18 +55,23 @@ QString ParseTreeModel::genCode()
return "";
}
-bool ParseTreeModel::changeTree(const char *document)
+QString ParseTreeModel::changeTree(const char *document)
{
struct skin_element* test = skin_parse(document);
if(!test)
- return false;
+ {
+ QString error = tr("Error on line ") +
+ QString::number(skin_error_line())
+ + tr(": ") + QString(skin_error_message());
+ return error;
+ }
ParseTreeNode* temp = new ParseTreeNode(test);
if(root && temp->genHash() == root->genHash())
{
delete temp;
- return true;
+ return tr("Document Parses Successfully");
}
if(root)
@@ -81,7 +86,7 @@ bool ParseTreeModel::changeTree(const char *document)
emit beginInsertRows(QModelIndex(), 0, temp->numChildren() - 1);
emit endInsertRows();
- return true;
+ return tr("Document Parses Successfully");
}