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 <marc.mutz@qt.io>
bb10
Mate Barany 2022-11-28 17:35:58 +01:00
parent 1a1fd1566c
commit a0bb64126c
1 changed files with 2 additions and 2 deletions

View File

@ -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) {