summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qjsonobject.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-02-15 11:48:32 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-07-20 13:15:55 +0200
commit16c453069f7b44ba7328a178b4b9ce99a150813e (patch)
tree381cb018518643e8aa5d58c7c84f31a6af965746 /src/corelib/serialization/qjsonobject.cpp
parentad17a1674c21223719ffcf54d35c1ea3eb2356cd (diff)
QtBase: eradicate QT_STRINGVIEW_LEVEL uses
It's not used and not useful. The macro itself has to stay, for now, because Qt5Compat uses it, too. Task-number: QTBUG-100861 Pick-to: 6.4 6.3 6.2 Change-Id: I5d0557a6c959d6facf6e47f26786a9d365339e95 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/serialization/qjsonobject.cpp')
-rw-r--r--src/corelib/serialization/qjsonobject.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/corelib/serialization/qjsonobject.cpp b/src/corelib/serialization/qjsonobject.cpp
index a3e5bd695e5..0a5bafd1cbf 100644
--- a/src/corelib/serialization/qjsonobject.cpp
+++ b/src/corelib/serialization/qjsonobject.cpp
@@ -278,7 +278,6 @@ static qsizetype indexOf(const QExplicitlySharedDataPointer<QCborContainerPrivat
return it.it - begin.it;
}
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Returns a QJsonValue representing the value for the key \a key.
@@ -290,7 +289,6 @@ QJsonValue QJsonObject::value(const QString &key) const
{
return value(QStringView(key));
}
-#endif
/*!
\overload
@@ -326,7 +324,6 @@ QJsonValue QJsonObject::valueImpl(T key) const
return QJsonPrivate::Value::fromTrustedCbor(o->valueAt(i + 1));
}
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Returns a QJsonValue representing the value for the key \a key.
@@ -340,7 +337,6 @@ QJsonValue QJsonObject::operator [](const QString &key) const
{
return (*this)[QStringView(key)];
}
-#endif
/*!
\fn QJsonValue QJsonObject::operator [](QStringView key) const
@@ -356,7 +352,6 @@ QJsonValue QJsonObject::operator [](const QString &key) const
\since 5.7
*/
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Returns a reference to the value for \a key. If there is no value with key
\a key in the object, one is created with a QJsonValue::Null value and then
@@ -374,7 +369,6 @@ QJsonValueRef QJsonObject::operator [](const QString &key)
{
return (*this)[QStringView(key)];
}
-#endif
/*!
\overload
@@ -414,7 +408,6 @@ QJsonValueRef QJsonObject::atImpl(T key)
return QJsonValueRef(this, index / 2);
}
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Inserts a new item with the key \a key and a value of \a value.
@@ -432,7 +425,6 @@ QJsonObject::iterator QJsonObject::insert(const QString &key, const QJsonValue &
{
return insert(QStringView(key), value);
}
-#endif
/*!
\overload
@@ -487,7 +479,6 @@ QJsonObject::iterator QJsonObject::insertAt(qsizetype pos, T key, const QJsonVal
return {this, pos / 2};
}
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Removes \a key from the object.
@@ -497,7 +488,6 @@ void QJsonObject::remove(const QString &key)
{
remove(QStringView(key));
}
-#endif
/*!
\overload
@@ -534,7 +524,6 @@ void QJsonObject::removeImpl(T key)
removeAt(index);
}
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Removes \a key from the object.
@@ -548,7 +537,6 @@ QJsonValue QJsonObject::take(const QString &key)
{
return take(QStringView(key));
}
-#endif
/*!
\overload
@@ -588,7 +576,6 @@ QJsonValue QJsonObject::takeImpl(T key)
return v;
}
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Returns \c true if the object contains key \a key.
@@ -598,7 +585,6 @@ bool QJsonObject::contains(const QString &key) const
{
return contains(QStringView(key));
}
-#endif
/*!
\overload
@@ -680,7 +666,6 @@ QJsonObject::iterator QJsonObject::erase(QJsonObject::iterator it)
return { this, qsizetype(it.item.index) };
}
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Returns an iterator pointing to the item with key \a key in the
map.
@@ -692,7 +677,6 @@ QJsonObject::iterator QJsonObject::find(const QString &key)
{
return find(QStringView(key));
}
-#endif
/*!
\overload
@@ -726,12 +710,10 @@ QJsonObject::iterator QJsonObject::findImpl(T key)
return {this, index / 2};
}
-#if QT_STRINGVIEW_LEVEL < 2
/*! \fn QJsonObject::const_iterator QJsonObject::find(const QString &key) const
\overload
*/
-#endif
/*! \fn QJsonObject::const_iterator QJsonObject::find(QStringView key) const
@@ -745,7 +727,6 @@ QJsonObject::iterator QJsonObject::findImpl(T key)
\since 5.7
*/
-#if QT_STRINGVIEW_LEVEL < 2
/*!
Returns a const iterator pointing to the item with key \a key in the
map.
@@ -757,7 +738,6 @@ QJsonObject::const_iterator QJsonObject::constFind(const QString &key) const
{
return constFind(QStringView(key));
}
-#endif
/*!
\overload