From e1818d9e9c7e9ce6b5857054926a5f7c7f44e0d9 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 31 Mar 2023 12:04:01 +0200 Subject: QXmlStreamAttributes: port value()/hasAttribute() to QAnyStringView [ChangeLog][QtCore][QXmlStreamAttributes] Ported value() and hasAttribute() to QAnyStringView. Change-Id: I771b9cede1d581d3f1142246e7a25c36bcc850d6 Reviewed-by: Fabian Kosmale Reviewed-by: Edward Welbourne Reviewed-by: Qt CI Bot --- src/corelib/compat/removed_api.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/corelib/compat/removed_api.cpp') diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index e1d9c9eccf..399d7b15f5 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -524,6 +524,34 @@ qsizetype QString::toUcs4_helper(const ushort *uc, qsizetype length, uint *out) reinterpret_cast(out)); } +#include "qxmlstream.h" + +QStringView QXmlStreamAttributes::value(const QString &namespaceUri, const QString &name) const +{ + return value(qToAnyStringViewIgnoringNull(namespaceUri), qToAnyStringViewIgnoringNull(name)); +} + +QStringView QXmlStreamAttributes::value(const QString &namespaceUri, QLatin1StringView name) const +{ + return value(qToAnyStringViewIgnoringNull(namespaceUri), QAnyStringView(name)); +} + +QStringView QXmlStreamAttributes::value(QLatin1StringView namespaceUri, QLatin1StringView name) const +{ + return value(QAnyStringView(namespaceUri), QAnyStringView(name)); +} + +QStringView QXmlStreamAttributes::value(const QString &qualifiedName) const +{ + return value(qToAnyStringViewIgnoringNull(qualifiedName)); +} + +QStringView QXmlStreamAttributes::value(QLatin1StringView qualifiedName) const +{ + return value(QAnyStringView(qualifiedName)); +} + + // #include "qotherheader.h" // // implement removed functions from qotherheader.h // order sections alphabetically to reduce chances of merge conflicts -- cgit v1.2.3