Port QXmlStreamWriterPrivate::writeStartElement to QAnyStringView

This is a prerequisite step of porting the QXmlStreamWriter API to
QAnyStringView.

Task-number: QTBUG-103302
Change-Id: I73383c2b09a4a70bfc23bbc6c6b1d62cb878a6b1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
Mate Barany 2022-11-29 14:20:08 +01:00
parent a0bb64126c
commit 7241d2fb5a

View File

@ -2812,7 +2812,7 @@ public:
void writeEscaped(const QString &, bool escapeWhitespace = false);
void write(const char *s, qsizetype len);
bool finishStartElement(bool contents = true);
void writeStartElement(const QString &namespaceUri, const QString &name);
void writeStartElement(QAnyStringView namespaceUri, QAnyStringView name);
QIODevice *device;
QString *stringDevice;
uint deleteDevice :1;
@ -3627,7 +3627,7 @@ void QXmlStreamWriter::writeStartElement(const QString &namespaceUri, const QStr
d->writeStartElement(namespaceUri, name);
}
void QXmlStreamWriterPrivate::writeStartElement(const QString &namespaceUri, const QString &name)
void QXmlStreamWriterPrivate::writeStartElement(QAnyStringView namespaceUri, QAnyStringView name)
{
if (!finishStartElement(false) && autoFormatting)
indent(tagStack.size());