diff options
author | Mat Sutcliffe <oktal3700@gmail.com> | 2019-07-12 20:22:49 +0100 |
---|---|---|
committer | Mat Sutcliffe <oktal3700@gmail.com> | 2019-07-20 12:04:31 +0100 |
commit | 7f8e3aab2d5aca5349fd0f0da6245465dc7db5e0 (patch) | |
tree | 658a61cfcb1df2def13f59d0eebe6d5afad01791 /src/corelib/serialization/qjsonvalue.h | |
parent | a4e9fa03cabfc11105e700e38184a70888da4e7a (diff) |
JSON: add some QStringView overloads
[ChangeLog][QtCore][JSON] Added overloads of functions taking key
strings as QStringView; in QJsonObject, QJsonValue and QJsonDocument.
Change-Id: I78b40aba8200003acfae257ff06f5f15737005e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Diffstat (limited to 'src/corelib/serialization/qjsonvalue.h')
-rw-r--r-- | src/corelib/serialization/qjsonvalue.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/serialization/qjsonvalue.h b/src/corelib/serialization/qjsonvalue.h index 37d84f9e60..430fa06c0f 100644 --- a/src/corelib/serialization/qjsonvalue.h +++ b/src/corelib/serialization/qjsonvalue.h @@ -137,7 +137,10 @@ public: QJsonObject toObject() const; QJsonObject toObject(const QJsonObject &defaultValue) const; +#if QT_STRINGVIEW_LEVEL < 2 const QJsonValue operator[](const QString &key) const; +#endif + const QJsonValue operator[](QStringView key) const; const QJsonValue operator[](QLatin1String key) const; const QJsonValue operator[](int i) const; |