From fe70367fe06984d1ac84cc276ca3fd3edc4193c7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 27 Jan 2014 07:21:31 -0800 Subject: [PATCH] Include the duplicated attribute name in the error message Task-number: QTBUG-36467 Change-Id: Ic2610bd7c8df12fce4ec2ce14bd96f4595bd38af Reviewed-by: Robin Burchell --- src/corelib/xml/qxmlstream.cpp | 2 +- tests/auto/corelib/xml/qxmlstream/data/009.ref | 2 +- tests/auto/corelib/xml/qxmlstream/data/010.ref | 2 +- tests/auto/corelib/xml/qxmlstream/data/011.ref | 2 +- tests/auto/corelib/xml/qxmlstream/data/012.ref | 2 +- tests/auto/corelib/xml/qxmlstream/data/035.ref | 2 +- tests/auto/corelib/xml/qxmlstream/data/036.ref | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 83d0c73ae1..69049aaccf 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -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())); } } diff --git a/tests/auto/corelib/xml/qxmlstream/data/009.ref b/tests/auto/corelib/xml/qxmlstream/data/009.ref index 1de530df1c..12b994eac4 100644 --- a/tests/auto/corelib/xml/qxmlstream/data/009.ref +++ b/tests/auto/corelib/xml/qxmlstream/data/009.ref @@ -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. diff --git a/tests/auto/corelib/xml/qxmlstream/data/010.ref b/tests/auto/corelib/xml/qxmlstream/data/010.ref index 217f4963a1..07def503a5 100644 --- a/tests/auto/corelib/xml/qxmlstream/data/010.ref +++ b/tests/auto/corelib/xml/qxmlstream/data/010.ref @@ -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. diff --git a/tests/auto/corelib/xml/qxmlstream/data/011.ref b/tests/auto/corelib/xml/qxmlstream/data/011.ref index e3945324eb..faa6e75429 100644 --- a/tests/auto/corelib/xml/qxmlstream/data/011.ref +++ b/tests/auto/corelib/xml/qxmlstream/data/011.ref @@ -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. diff --git a/tests/auto/corelib/xml/qxmlstream/data/012.ref b/tests/auto/corelib/xml/qxmlstream/data/012.ref index 7a688b103d..834db97ba6 100644 --- a/tests/auto/corelib/xml/qxmlstream/data/012.ref +++ b/tests/auto/corelib/xml/qxmlstream/data/012.ref @@ -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. diff --git a/tests/auto/corelib/xml/qxmlstream/data/035.ref b/tests/auto/corelib/xml/qxmlstream/data/035.ref index e172fc90e1..cab0158a51 100644 --- a/tests/auto/corelib/xml/qxmlstream/data/035.ref +++ b/tests/auto/corelib/xml/qxmlstream/data/035.ref @@ -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. diff --git a/tests/auto/corelib/xml/qxmlstream/data/036.ref b/tests/auto/corelib/xml/qxmlstream/data/036.ref index 158e7361f9..50939ed7e7 100644 --- a/tests/auto/corelib/xml/qxmlstream/data/036.ref +++ b/tests/auto/corelib/xml/qxmlstream/data/036.ref @@ -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.