mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb+LibWebVew+WebContent+UI: Add IPC to retrieve the system clipboard
We currently have a single IPC to set clipboard data. We will also need an IPC to retrieve that data from the UI. This defines system clipboard data in LibWeb to handle this transfer, and adds the IPC to provide it.
This commit is contained in:
parent
5fb5066e89
commit
61c0f67c8c
Notes:
github-actions[bot]
2025-05-02 21:47:42 +00:00
Author: https://github.com/trflynn89
Commit: 61c0f67c8c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4548
Reviewed-by: https://github.com/shannonbooth
23 changed files with 255 additions and 28 deletions
|
@ -13,6 +13,11 @@ AK::ByteString ak_byte_string_from_qstring(QString const& qstring)
|
|||
return AK::ByteString(utf8_data.data(), utf8_data.size());
|
||||
}
|
||||
|
||||
AK::ByteString ak_byte_string_from_qbytearray(QByteArray const& qbytearray)
|
||||
{
|
||||
return AK::ByteString(qbytearray.data(), qbytearray.size());
|
||||
}
|
||||
|
||||
String ak_string_from_qstring(QString const& qstring)
|
||||
{
|
||||
auto utf8_data = qstring.toUtf8();
|
||||
|
@ -24,6 +29,11 @@ QString qstring_from_ak_string(StringView ak_string)
|
|||
return QString::fromUtf8(ak_string.characters_without_null_termination(), static_cast<qsizetype>(ak_string.length()));
|
||||
}
|
||||
|
||||
QByteArray qbytearray_from_ak_string(StringView ak_string)
|
||||
{
|
||||
return { ak_string.characters_without_null_termination(), static_cast<qsizetype>(ak_string.length()) };
|
||||
}
|
||||
|
||||
Optional<URL::URL> ak_url_from_qstring(QString const& qstring)
|
||||
{
|
||||
auto utf8_data = qstring.toUtf8();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue