summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qxmlstream.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-07-24 09:53:52 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-07-24 14:09:00 +0200
commitd164ec4abe75726469f2cfcff418602ad710408e (patch)
treef00c4584080c6c068166c94c3958e41cbcebd028 /src/corelib/serialization/qxmlstream.cpp
parent6213f6565c4a50590260b8a270e2c3c2d864ed3b (diff)
QXmlStreamReader: Fix translation context of error messages
QObject::tr() should not be used. Amends c4301be7d5f94852e1b17f2c2989d5ca807855d4. Task-number: QTBUG-92113 Task-number: QTBUG-95188 Pick-to: 6.6 6.5 Change-Id: I09547c3d048d6b3726e33be74b06035f0eec4f31 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/corelib/serialization/qxmlstream.cpp')
-rw-r--r--src/corelib/serialization/qxmlstream.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
index 07211fe2ea2..6e2c0cb9ea4 100644
--- a/src/corelib/serialization/qxmlstream.cpp
+++ b/src/corelib/serialization/qxmlstream.cpp
@@ -3926,7 +3926,7 @@ void QXmlStreamReaderPrivate::checkToken()
if (!ok) {
raiseError(QXmlStreamReader::UnexpectedElementError,
- QObject::tr("Unexpected token type %1 in %2.")
+ QXmlStream::tr("Unexpected token type %1 in %2.")
.arg(q->tokenString(), contextString(context)));
return;
}
@@ -3937,7 +3937,7 @@ void QXmlStreamReaderPrivate::checkToken()
// Raise error on multiple DTD tokens
if (foundDTD) {
raiseError(QXmlStreamReader::UnexpectedElementError,
- QObject::tr("Found second DTD token in %1.").arg(contextString(context)));
+ QXmlStream::tr("Found second DTD token in %1.").arg(contextString(context)));
} else {
foundDTD = true;
}