From a0bb64126c28e7962a7c0ba05e79f30172f5afe6 Mon Sep 17 00:00:00 2001 From: Mate Barany Date: Mon, 28 Nov 2022 17:35:58 +0100 Subject: [PATCH] Port QXmlStreamWriterPrivate::findNameSpace to QAnyStringView This is a prerequisite of porting the QXmlStreamWriter API to QAnyStringView. Task-number: QTBUG-103302 Change-Id: I1433de66c9aefe6f3e8f7cd8e831718d2db88eb6 Reviewed-by: Marc Mutz --- src/corelib/serialization/qxmlstream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp index 1bb401048f..6692534052 100644 --- a/src/corelib/serialization/qxmlstream.cpp +++ b/src/corelib/serialization/qxmlstream.cpp @@ -2827,7 +2827,7 @@ public: NamespaceDeclaration emptyNamespace; qsizetype lastNamespaceDeclaration; - NamespaceDeclaration &findNamespace(const QString &namespaceUri, bool writeDeclaration = false, bool noDefault = false); + NamespaceDeclaration &findNamespace(QAnyStringView namespaceUri, bool writeDeclaration = false, bool noDefault = false); void writeNamespaceDeclaration(const NamespaceDeclaration &namespaceDeclaration); int namespacePrefixCount; @@ -2961,7 +2961,7 @@ bool QXmlStreamWriterPrivate::finishStartElement(bool contents) return hadSomethingWritten; } -QXmlStreamPrivateTagStack::NamespaceDeclaration &QXmlStreamWriterPrivate::findNamespace(const QString &namespaceUri, bool writeDeclaration, bool noDefault) +QXmlStreamPrivateTagStack::NamespaceDeclaration &QXmlStreamWriterPrivate::findNamespace(QAnyStringView namespaceUri, bool writeDeclaration, bool noDefault) { for (NamespaceDeclaration &namespaceDeclaration : reversed(namespaceDeclarations)) { if (namespaceDeclaration.namespaceUri == namespaceUri) {