1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

Ladybird/Qt: Replace the QString-from-AK helpers with a single method

There's no need for 2 overloads for String and DeprecatedString, we can
just use a StringView. This also avoids some cases of needlessly
allocating a DeprecatedString from a StringView when calling this
method.
This commit is contained in:
Timothy Flynn 2023-12-04 09:55:47 -05:00 committed by Andrew Kaster
parent 4d5d282e6a
commit 1aedb0ae5a
8 changed files with 21 additions and 27 deletions

View file

@ -114,10 +114,10 @@ WebContentView::WebContentView(WebContentOptions const& web_content_options, Str
update_cursor(cursor);
};
on_enter_tooltip_area = [this](auto position, auto tooltip) {
on_enter_tooltip_area = [this](auto position, auto const& tooltip) {
QToolTip::showText(
mapToGlobal(QPoint(position.x(), position.y())),
qstring_from_ak_deprecated_string(tooltip),
qstring_from_ak_string(tooltip),
this);
};