[Task Manager] Create toolTipDelegate on demand
AbandonedPublic

Authored by broulik on Dec 1 2016, 5:00 PM.

Details

Reviewers
hein
Group Reviewers
Plasma
Summary

ToolTipTelegate is quite complex, so load it only the first time it's used and don't if tooltips are disabled altogether:
Also move populating the tooltip data to aboutToShow, this way we don't repeatedly update it just because the mouse moved over Task Manager without actually resting long enough to trigger the tooltip.

Test Plan
  • All the bindings still work and the highlight effect also excludes the tooltip just fine.
  • Verified tooltip delegate is only created once
  • Verified disabling tooltip destroy delegate, and it is then recreated once when re-enabled as needed

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik updated this revision to Diff 8681.Dec 1 2016, 5:00 PM
broulik retitled this revision from to [Task Manager] Create toolTipDelegate on demand.
broulik updated this object.
broulik edited the test plan for this revision. (Show Details)
broulik added reviewers: Plasma, hein.
broulik set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptDec 1 2016, 5:00 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
hein edited edge metadata.Dec 6 2016, 2:53 PM

Could we use a loader to also destroy it when no longer needed, then?

destroy it when no longer needed

When I disable the "show tooltips" setting or when I close the tooltip? I don't want to re-create the tooltip item everytime, though.

hein added a comment.Feb 8 2017, 3:51 PM

destroy it when no longer needed

When I disable the "show tooltips" setting or when I close the tooltip? I don't want to re-create the tooltip item everytime, though.

Just the setting~

broulik updated this revision to Diff 26749.Feb 8 2018, 8:35 AM
broulik edited the summary of this revision. (Show Details)
broulik edited the test plan for this revision. (Show Details)
  • Rebase ontop of master
  • Populate in aboutToShow (cf. D10381)
  • Destroy toolTipDelegate when tooltips are disabled
hein accepted this revision.Feb 8 2018, 8:39 AM

Sometimes I wish we'd implement lazy loading in the backends instead (e.g. why is heavy when it's never been visible). The more we optimize our QML the more we go procedural/non-declarative and hard to read sadly.

This revision is now accepted and ready to land.Feb 8 2018, 8:39 AM
broulik abandoned this revision.Apr 25 2018, 11:42 AM

It seems to cause a lot of trouble with grouping and things, the tooltip is just super wonky with this. Needs to be revisited from scratch again