diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-03-09 21:26:01 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2022-03-26 01:44:05 +0100 |
commit | b6251958932be5966258f362dc9bb7c7475d2d0a (patch) | |
tree | 2b2dc46c0d097fca15bcc9e2701682919921c339 /src/corelib/serialization/qcborvalue.cpp | |
parent | 73a03a0c298461aa15d7c2757bc0b6444e5dc3dc (diff) |
QtCore: Replace remaining uses of QLatin1String with QLatin1StringView
Task-number: QTBUG-98434
Change-Id: Ib7c5fc0aaca6ef33b93c7486e99502c555bf20bc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/serialization/qcborvalue.cpp')
-rw-r--r-- | src/corelib/serialization/qcborvalue.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp index e4972a30ba..af8ac55f58 100644 --- a/src/corelib/serialization/qcborvalue.cpp +++ b/src/corelib/serialization/qcborvalue.cpp @@ -1395,7 +1395,7 @@ static void encodeToCbor(QCborStreamWriter &writer, const QCborContainerPrivate return writer.append(b->asStringView()); return writer.appendTextString(b->byte(), b->len); } - return writer.append(QLatin1String()); + return writer.append(QLatin1StringView()); case QCborValue::Array: case QCborValue::Map: @@ -1755,7 +1755,7 @@ QCborValue::QCborValue(QStringView s) \sa toString(), isString(), isByteArray() */ -QCborValue::QCborValue(QLatin1String s) +QCborValue::QCborValue(QLatin1StringView s) : n(0), container(new QCborContainerPrivate), t(String) { container->append(s); @@ -2192,7 +2192,7 @@ const QCborValue QCborValue::operator[](const QString &key) const \sa operator[](qint64), QCborMap::operator[], QCborMap::value(), QCborMap::find() */ -const QCborValue QCborValue::operator[](QLatin1String key) const +const QCborValue QCborValue::operator[](QLatin1StringView key) const { return QCborContainerPrivate::findCborMapKey(*this, key); } @@ -2349,7 +2349,7 @@ QCborValueRef QCborValue::operator[](const QString &key) \sa operator[](qint64), QCborMap::operator[], QCborMap::value(), QCborMap::find() */ -QCborValueRef QCborValue::operator[](QLatin1String key) +QCborValueRef QCborValue::operator[](QLatin1StringView key) { return QCborContainerPrivate::findOrAddMapKey(*this, key); } @@ -2703,7 +2703,7 @@ const QCborValue QCborValueConstRef::operator[](const QString &key) const return item[key]; } -const QCborValue QCborValueConstRef::operator[](const QLatin1String key) const +const QCborValue QCborValueConstRef::operator[](const QLatin1StringView key) const { const QCborValue item = d->valueAt(i); return item[key]; @@ -2761,7 +2761,7 @@ const QCborValue QCborValueRef::operator[](const QString &key) const \sa operator[](qint64), QCborMap::operator[], QCborMap::value(), QCborMap::find() */ -const QCborValue QCborValueRef::operator[](QLatin1String key) const +const QCborValue QCborValueRef::operator[](QLatin1StringView key) const { return QCborValueConstRef::operator[](key); } @@ -2817,7 +2817,7 @@ QCborValueRef QCborValueRef::operator[](const QString &key) \sa operator[](qint64), QCborMap::operator[], QCborMap::value(), QCborMap::find() */ -QCborValueRef QCborValueRef::operator[](QLatin1String key) +QCborValueRef QCborValueRef::operator[](QLatin1StringView key) { return QCborContainerPrivate::findOrAddMapKey(*this, key); } |