QAnyStringView: fix construction from QL1SV for bootstrapped builds
The SizeShift was not taken into account when constructing QASV from QL1SV. This is not an issue in normal Qt builds, because SizeShift == 0 there. But in bootstrapped case (and in future Qt 7) SizeShift changes to 2, and the bug becomes visible. The tests that were available on dev were never picked to earlier branches, so the cherry-pick skips the test improvement. Change-Id: I337b37b5230323a5357f48fd1c9bf799ca507d52 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d752da1857358726b89027ac039c20c1cd696b36) Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
8d47db7a78
commit
72024ef741
@ -89,7 +89,7 @@ qsizetype QStringView::count(QLatin1StringView s, Qt::CaseSensitivity cs) const
|
||||
//
|
||||
|
||||
constexpr QAnyStringView::QAnyStringView(QLatin1StringView str) noexcept
|
||||
: m_data{str.data()}, m_size{size_t(str.size()) | Tag::Latin1} {}
|
||||
: m_data{str.data()}, m_size{size_t(str.size() << SizeShift) | Tag::Latin1} {}
|
||||
|
||||
constexpr QLatin1StringView QAnyStringView::asLatin1StringView() const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user