Include the duplicated attribute name in the error message

Task-number: QTBUG-36467
Change-Id: Ic2610bd7c8df12fce4ec2ce14bd96f4595bd38af
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
Thiago Macieira 2014-01-27 07:21:31 -08:00 committed by The Qt Project
parent 31ce6f50c6
commit fe70367fe0
7 changed files with 7 additions and 7 deletions

View File

@ -1631,7 +1631,7 @@ void QXmlStreamReaderPrivate::resolveTag()
if (attributes[j].name() == attribute.name()
&& attributes[j].namespaceUri() == attribute.namespaceUri()
&& (namespaceProcessing || attributes[j].qualifiedName() == attribute.qualifiedName()))
raiseWellFormedError(QXmlStream::tr("Attribute redefined."));
raiseWellFormedError(QXmlStream::tr("Attribute '%1' redefined.").arg(attribute.qualifiedName().toString()));
}
}

View File

@ -24,4 +24,4 @@ Invalid( name="bar" qualifiedName="bar"
Attribute( name="attr" namespaceUri="http://example.org/~wilbur" qualifiedName="b:attr" prefix="b" value="2" )
)
ERROR: Attribute redefined.
ERROR: Attribute 'b:attr' redefined.

View File

@ -24,4 +24,4 @@ Invalid( name="bar" qualifiedName="bar"
Attribute( name="attr" namespaceUri="http://example.org/~wilbur" qualifiedName="b:attr" prefix="b" value="2" )
)
ERROR: Attribute redefined.
ERROR: Attribute 'b:attr' redefined.

View File

@ -27,4 +27,4 @@ Invalid( name="bar" qualifiedName="bar"
Attribute( name="attr" namespaceUri="http://example.org/~wilbur" qualifiedName="b:attr" prefix="b" value="2" )
)
ERROR: Attribute redefined.
ERROR: Attribute 'b:attr' redefined.

View File

@ -24,4 +24,4 @@ Invalid( name="bar" qualifiedName="bar"
Attribute( name="attr" namespaceUri="urn:xyzzy" qualifiedName="b:attr" prefix="b" value="2" )
)
ERROR: Attribute redefined.
ERROR: Attribute 'b:attr' redefined.

View File

@ -13,4 +13,4 @@ Invalid( name="bar" qualifiedName="bar"
Attribute( name="attr" namespaceUri="http://example.org/~wilbur" qualifiedName="a:attr" prefix="a" value="2" )
)
ERROR: Attribute redefined.
ERROR: Attribute 'a:attr' redefined.

View File

@ -13,4 +13,4 @@ Invalid( name="bar" qualifiedName="bar"
Attribute( name="attr" namespaceUri="http://example.org/~wilbur" qualifiedName="b:attr" prefix="b" value="2" )
)
ERROR: Attribute redefined.
ERROR: Attribute 'b:attr' redefined.