summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-01-27 07:21:31 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-06 01:20:19 +0200
commitfe70367fe06984d1ac84cc276ca3fd3edc4193c7 (patch)
tree00a389dc3cd08fb6d6d1d3b4822328b129d33ec2
parent31ce6f50c679e61dc53f09ee1b1637918da38a82 (diff)
Include the duplicated attribute name in the error message
Task-number: QTBUG-36467 Change-Id: Ic2610bd7c8df12fce4ec2ce14bd96f4595bd38af Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
-rw-r--r--src/corelib/xml/qxmlstream.cpp2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/009.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/010.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/011.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/012.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/035.ref2
-rw-r--r--tests/auto/corelib/xml/qxmlstream/data/036.ref2
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.