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/plugin/quuid.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/plugin/quuid.cpp')
| -rw-r--r-- | src/corelib/plugin/quuid.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp index 7d9bd65f8b1..e856edb7bfc 100644 --- a/src/corelib/plugin/quuid.cpp +++ b/src/corelib/plugin/quuid.cpp @@ -395,7 +395,7 @@ static QUuid createFromName(const QUuid &ns, const QByteArray &baseData, QCrypto public data members in QUuid. \note In Qt versions prior to 6.3, this function was an overload - set consisting of QStringView and QLatin1String instead of + set consisting of QStringView and QLatin1StringView instead of one function taking QAnyStringView. \sa toString(), QUuid() @@ -416,13 +416,13 @@ static QUuid uuidFromString(QStringView text) noexcept return _q_uuidFromHex(latin1); } -static QUuid uuidFromString(QLatin1String text) noexcept +static QUuid uuidFromString(QLatin1StringView text) noexcept { if (Q_UNLIKELY(text.size() < MaxStringUuidLength - 2 || (text.front() == '{' && text.size() < MaxStringUuidLength - 1))) { // Too short. Don't call _q_uuidFromHex(); QL1Ss need not be NUL-terminated, // and we don't want to read trailing garbage as potentially valid data. - text = QLatin1String(); + text = QLatin1StringView(); } return _q_uuidFromHex(text.data()); } @@ -431,7 +431,7 @@ Q_ALWAYS_INLINE // can treat UTF-8 the same as Latin-1: static QUuid uuidFromString(QUtf8StringView text) noexcept { - return uuidFromString(QLatin1String(text.data(), text.size())); + return uuidFromString(QLatin1StringView(text.data(), text.size())); } QUuid QUuid::fromString(QAnyStringView text) noexcept |
