Utils: Fix build before Qt6.4

Change-Id: I140aaa32950118f96b92a8644e76f4d5180e46f1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Christian Stenger
2024-02-01 11:04:22 +01:00
parent cc03aff960
commit 218878150d
2 changed files with 5 additions and 0 deletions

View File

@@ -199,10 +199,13 @@ public:
SmallStringView toStringView() const noexcept { return SmallStringView(data(), size()); }
operator SmallStringView() const noexcept { return SmallStringView(data(), size()); }
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
explicit operator QLatin1StringView() const noexcept
{
return QLatin1StringView(data(), Utils::ssize(*this));
}
#endif
operator QUtf8StringView() const noexcept
{

View File

@@ -79,10 +79,12 @@ public:
explicit operator QByteArray() const { return QByteArray(data(), int(size())); }
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
explicit operator QLatin1StringView() const noexcept
{
return QLatin1StringView(data(), Utils::ssize(*this));
}
#endif
operator QUtf8StringView() const noexcept
{