]> cloud.milkyroute.net Git - dolphin.git/commit
[ToolTipManager] Create DolphinFileMetaDataWidget on-demand again
authorKai Uwe Broulik <kde@privat.broulik.de>
Tue, 29 Mar 2022 07:36:30 +0000 (09:36 +0200)
committerKai Uwe Broulik <kde@privat.broulik.de>
Thu, 31 Mar 2022 12:22:24 +0000 (14:22 +0200)
commit64ffcdad4ff60e1f0b443c00229e6aacf523c72f
tree0b0715791a310c2b1698d568cd5962dfad3ad063
parent447c35868c6268789e8f2ae0abecd28df02029d8
[ToolTipManager] Create DolphinFileMetaDataWidget on-demand again

This reverts b7fbd19a7660424e6839df37f12b33111408b1fc but creates the
widget only once and then reuses it.

However, ownership of a parent-less widget is transferred to the
`KToolTipWidget` but since we first request metadata, then show the
tooltip (or won't if the mouse moved on since), we cannot rely on
the `KToolTipWidget` exclusively.

Instead, when we still delete the widget ourself until we have
shown the `KToolTipWidget` once at which point it will handle the
life time for us.

This fixes parenting the widget to `DolphinView` which would make
it appear as a broken line in the top left of the window.
src/views/tooltips/tooltipmanager.cpp
src/views/tooltips/tooltipmanager.h