1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:37:35 +00:00

Userland: Port remaining calls to Widget::set_tooltip_deprecated()

Replaces `set_tooltip_deprecated(string);` with
`set_tooltip(MUST(String::from_deprecated_string(string)));`
purely to get rid of the deprecated function in the following commit.
This commit is contained in:
Karol Kosek 2023-09-10 23:00:25 +02:00 committed by Andreas Kling
parent ed3e729d4e
commit 03a54a519a
8 changed files with 13 additions and 13 deletions

View file

@ -216,7 +216,7 @@ void BookmarksBarWidget::model_did_update(unsigned)
button.set_fixed_size(font().width(title) + 32, 20);
button.set_relative_rect(rect);
button.set_focus_policy(GUI::FocusPolicy::TabFocus);
button.set_tooltip_deprecated(url);
button.set_tooltip(MUST(String::from_deprecated_string(url)));
button.set_allowed_mouse_buttons_for_pressing(GUI::MouseButton::Primary | GUI::MouseButton::Middle);
button.on_click = [title, url, this](auto) {

View file

@ -80,10 +80,10 @@ void InfinitelyScrollableTableView::mousemove_event(GUI::MouseEvent& event)
if (!is_dragging()) {
auto tooltip = model->data(index, static_cast<GUI::ModelRole>(SheetModel::Role::Tooltip));
if (tooltip.is_string()) {
set_tooltip_deprecated(tooltip.as_string());
set_tooltip(MUST(String::from_deprecated_string(tooltip.as_string())));
show_or_hide_tooltip();
} else {
set_tooltip_deprecated({});
set_tooltip({});
}
}