diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2022-12-09 23:43:35 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2022-12-11 11:46:24 +0100 |
| commit | ede4a508ce8764daf44c600236d3e31e8e5750b4 (patch) | |
| tree | c0051585ae5176e54ff44db842571fedb70b096d /src/corelib/serialization/qxmlstream.cpp | |
| parent | 59fb33e0952f6d11993191b6f9ad612971447615 (diff) | |
QXmlStreamWriter: remove Private::write(data, ptr)
... and port the last remaining user over to the QAnyStringView
overload.
Task-number: QTBUG-103302
Change-Id: I7edd855d6c2bc16180c642191aa0d477586c1e0b
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/serialization/qxmlstream.cpp')
| -rw-r--r-- | src/corelib/serialization/qxmlstream.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp index 71a4d28e59f..16c234b3cdd 100644 --- a/src/corelib/serialization/qxmlstream.cpp +++ b/src/corelib/serialization/qxmlstream.cpp @@ -2867,7 +2867,6 @@ public: void write(QAnyStringView s); void writeEscaped(QAnyStringView, bool escapeWhitespace = false); - void write(const char *s, qsizetype len); bool finishStartElement(bool contents = true); void writeStartElement(QAnyStringView namespaceUri, QAnyStringView name); QIODevice *device; @@ -2990,11 +2989,6 @@ void QXmlStreamWriterPrivate::writeEscaped(QAnyStringView s, bool escapeWhitespa write(escaped); } -void QXmlStreamWriterPrivate::write(const char *s, qsizetype len) -{ - write(QUtf8StringView(s, len)); -} - void QXmlStreamWriterPrivate::writeNamespaceDeclaration(const NamespaceDeclaration &namespaceDeclaration) { if (namespaceDeclaration.prefix.isEmpty()) { write(" xmlns=\""); @@ -3066,8 +3060,8 @@ QXmlStreamPrivateTagStack::NamespaceDeclaration &QXmlStreamWriterPrivate::findNa void QXmlStreamWriterPrivate::indent(int level) { write("\n"); - for (int i = level; i > 0; --i) - write(autoFormattingIndent.constData(), autoFormattingIndent.size()); + for (int i = 0; i < level; ++i) + write(autoFormattingIndent); } void QXmlStreamWriterPrivate::doWriteToDevice(QStringView s) |
