1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 23:17:44 +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

@ -89,11 +89,11 @@ void FlameGraphView::mousemove_event(GUI::MouseEvent& event)
if (on_hover_change)
on_hover_change();
DeprecatedString label = "";
String label;
if (m_hovered_bar != nullptr && m_hovered_bar->index.is_valid()) {
label = bar_label(*m_hovered_bar);
}
set_tooltip_deprecated(label);
set_tooltip(label);
show_or_hide_tooltip();
update();
@ -175,12 +175,12 @@ void FlameGraphView::paint_event(GUI::PaintEvent& event)
}
}
DeprecatedString FlameGraphView::bar_label(StackBar const& bar) const
String FlameGraphView::bar_label(StackBar const& bar) const
{
auto label_index = bar.index.sibling_at_column(m_text_column);
DeprecatedString label = "All";
String label = "All"_string;
if (label_index.is_valid()) {
label = m_model.data(label_index).to_deprecated_string();
label = MUST(String::from_deprecated_string(m_model.data(label_index).to_deprecated_string()));
}
return label;
}