diff options
author | Axel Spoerl <axel.spoerl@qt.io> | 2023-05-30 09:01:24 +0200 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2023-06-04 01:18:05 +0200 |
commit | 27906b7da84c22b244b612a557f57606d8d4d626 (patch) | |
tree | 001987e5bc73d20bd6597009e50ce4fe97926e85 /src/corelib/serialization | |
parent | 4ce97e25d30d870e97a353230b59fea82ffbd2e5 (diff) |
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>
Diffstat (limited to 'src/corelib/serialization')
-rw-r--r-- | src/corelib/serialization/qxmlstream.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp index 61c9f343ec..f630aa9743 100644 --- a/src/corelib/serialization/qxmlstream.cpp +++ b/src/corelib/serialization/qxmlstream.cpp @@ -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); } } |