Commit 8ad9bf60 authored by pixhawk's avatar pixhawk

Improving DOM view of messages

parent d1d6f8f9
......@@ -36,7 +36,26 @@ QVariant DomModel::data(const QModelIndex &index, int role) const
switch (index.column()) {
case 0:
return node.nodeName();
{
if (node.nodeName() == "message")
{
for (int i = 0; i < attributeMap.count(); ++i) {
QDomNode attribute = attributeMap.item(i);
if (attribute.nodeName() == "name") return attribute.nodeValue();
}
}
if (node.nodeName() == "field")
{
for (int i = 0; i < attributeMap.count(); ++i) {
QDomNode attribute = attributeMap.item(i);
if (attribute.nodeName() == "name") return attribute.nodeValue();
}
}
else
{
return node.nodeName();
}
}
case 1:
for (int i = 0; i < attributeMap.count(); ++i) {
QDomNode attribute = attributeMap.item(i);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment