mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:38:10 +00:00
Profiler: Use AK::Variant for type-specific data in Profile::Event
Each event has a different set of data depending on the event type.
This commit is contained in:
parent
f51f5e135a
commit
f5db92448d
3 changed files with 108 additions and 67 deletions
|
@ -135,7 +135,8 @@ void TimelineTrack::mousemove_event(GUI::MouseEvent& event)
|
|||
constexpr int hoverable_padding = 2;
|
||||
Gfx::IntRect hoverable_rect { x - hoverable_padding, frame_thickness(), hoverable_padding * 2, height() - frame_thickness() * 2 };
|
||||
if (hoverable_rect.contains_horizontally(event.x())) {
|
||||
GUI::Application::the()->show_tooltip_immediately(String::formatted("{}, {}", signpost.signpost_string, signpost.arg2), this);
|
||||
auto const& data = signpost.data.template get<Profile::Event::SignpostData>();
|
||||
GUI::Application::the()->show_tooltip_immediately(String::formatted("{}, {}", data.string, data.arg), this);
|
||||
hovering_a_signpost = true;
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue