mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
Ladybird/Qt: Make String allocation infallible
This commit is contained in:
parent
82c827fc56
commit
a21998003c
10 changed files with 27 additions and 32 deletions
|
@ -11,10 +11,10 @@ AK::DeprecatedString ak_deprecated_string_from_qstring(QString const& qstring)
|
|||
return AK::DeprecatedString(qstring.toUtf8().data());
|
||||
}
|
||||
|
||||
ErrorOr<String> ak_string_from_qstring(QString const& qstring)
|
||||
String ak_string_from_qstring(QString const& qstring)
|
||||
{
|
||||
auto utf8_data = qstring.toUtf8();
|
||||
return String::from_utf8(StringView(utf8_data.data(), utf8_data.size()));
|
||||
return MUST(String::from_utf8(StringView(utf8_data.data(), utf8_data.size())));
|
||||
}
|
||||
|
||||
QString qstring_from_ak_string(StringView ak_string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue