diff --git a/Ladybird/Qt/StringUtils.cpp b/Ladybird/Qt/StringUtils.cpp index 59ec635f3fb..1b2bdfcb363 100644 --- a/Ladybird/Qt/StringUtils.cpp +++ b/Ladybird/Qt/StringUtils.cpp @@ -13,7 +13,8 @@ AK::DeprecatedString ak_deprecated_string_from_qstring(QString const& qstring) ErrorOr ak_string_from_qstring(QString const& qstring) { - return String::from_utf8(StringView(qstring.toUtf8().data(), qstring.size())); + auto utf8_data = qstring.toUtf8(); + return String::from_utf8(StringView(utf8_data.data(), utf8_data.size())); } QString qstring_from_ak_string(StringView ak_string)