diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-03-31 12:04:01 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-04-25 15:03:03 +0200 |
commit | e1818d9e9c7e9ce6b5857054926a5f7c7f44e0d9 (patch) | |
tree | 8a224afd422482f18b85d4df0f0c288c022a4388 /src/corelib/compat/removed_api.cpp | |
parent | c818acda97a7dc9f184e96fac4a0adbc56e1359e (diff) |
QXmlStreamAttributes: port value()/hasAttribute() to QAnyStringView
[ChangeLog][QtCore][QXmlStreamAttributes] Ported value() and
hasAttribute() to QAnyStringView.
Change-Id: I771b9cede1d581d3f1142246e7a25c36bcc850d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/compat/removed_api.cpp')
-rw-r--r-- | src/corelib/compat/removed_api.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
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<char32_t *>(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 |