QXmlStreamReader: Add key/value to "Invalid attribute" error message
When QXmlReaderPrivate::startDocument() parses declarations, it reports an error if a declaration contains an unknown attribute. The message doesn't mention the invalid attribute's key and value, so the user has to guess which one is the faulty declaration. This patch extends the error message by adding the respective key/value pair. Pick-to: 6.5 Change-Id: I7f5a228bed44937472880c3b3d63d5e816b39361 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>bb10
parent
4ce97e25d3
commit
27906b7da8
|
|
@ -1812,7 +1812,7 @@ void QXmlStreamReaderPrivate::startDocument()
|
|||
else
|
||||
err = QXmlStream::tr("Standalone accepts only yes or no.");
|
||||
} else {
|
||||
err = QXmlStream::tr("Invalid attribute in XML declaration.");
|
||||
err = QXmlStream::tr("Invalid attribute in XML declaration: %1 = %2").arg(key).arg(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue