emitparseState(tr("<font color=\"red\">ERROR: Missing required name=\"\" attribute for tag %2 near line %1\nAbort.</font>").arg(QString::number(e.lineNumber()),e.tagName()));
returnfalse;
}
else
{
// Sanity check: Accept only enum names not used previously
if(usedEnumNames->contains(enumName))
{
emitparseState(tr("<font color=\"red\">ERROR: Enum name %1 used twice, second occurence near line %2 of file %3\nAbort.</font>").arg(enumName,QString::number(e.lineNumber()),fileName));
// If value was given, use it, if not, use the enum iterator
// value. The iterator value gets reset by manual values
QStringfieldName=e2.attribute("name","");
if(fieldValue.length()==0)
{
fieldValue=QString::number(nextEnumValue);
nextEnumValue++;
}
else
{
boolok;
nextEnumValue=fieldValue.toInt(&ok)+1;
if(!ok)
{
emitparseState(tr("<font color=\"red\">ERROR: Enum entry %1 has not a valid number (%2) in the value field.\nAbort.</font>").arg(fieldName,fieldValue));