mirror of
https://github.com/RGBCube/serenity
synced 2025-06-02 23:18:14 +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());
|
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)
|
QString qstring_from_ak_deprecated_string(AK::DeprecatedString const& ak_deprecated_string)
|
||||||
{
|
{
|
||||||
return QString::fromUtf8(ak_deprecated_string.characters(), ak_deprecated_string.length());
|
return QString::fromUtf8(ak_deprecated_string.characters(), ak_deprecated_string.length());
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/DeprecatedString.h>
|
#include <AK/DeprecatedString.h>
|
||||||
|
#include <AK/String.h>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
AK::DeprecatedString ak_deprecated_string_from_qstring(QString const&);
|
AK::DeprecatedString ak_deprecated_string_from_qstring(QString const&);
|
||||||
|
ErrorOr<String> ak_string_from_qstring(QString const&);
|
||||||
QString qstring_from_ak_deprecated_string(AK::DeprecatedString const&);
|
QString qstring_from_ak_deprecated_string(AK::DeprecatedString const&);
|
||||||
void platform_init();
|
void platform_init();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue