mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 03:57:35 +00:00
Ladybird: Add ak_string_from_qstring
function
This will be used later when doing the conversion from the QString in QSettings for the homepage URL.
This commit is contained in:
parent
4be6ee85e0
commit
65cf562a71
2 changed files with 7 additions and 0 deletions
|
@ -19,6 +19,11 @@ 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)
|
||||
{
|
||||
return String::from_utf8(StringView(qstring.toUtf8().data(), qstring.size()));
|
||||
}
|
||||
|
||||
QString qstring_from_ak_deprecated_string(AK::DeprecatedString const& ak_deprecated_string)
|
||||
{
|
||||
return QString::fromUtf8(ak_deprecated_string.characters(), ak_deprecated_string.length());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue