QDom: remove uneeded toString()

The trimmed() function is available on QStringView, too.

Pick-to: 6.3 6.2
Change-Id: I0cfde56d910da5abbebfb57396b22a1d21bdf763
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Marc Mutz 2022-03-23 18:42:07 +01:00
parent b625195893
commit 64db79f856

View File

@ -364,7 +364,7 @@ bool QDomParser::parseBody()
break;
case QXmlStreamReader::Characters:
if (!reader->isWhitespace()) { // Skip the content consisting of only whitespaces
if (!reader->text().toString().trimmed().isEmpty()) {
if (!reader->text().trimmed().isEmpty()) {
if (!domBuilder.characters(reader->text().toString(), reader->isCDATA())) {
domBuilder.fatalError(QDomParser::tr(
"Error occurred while processing the element content"));