parent full representation to the proper window at start

Authored by mart on Feb 20 2018, 5:58 PM.



this avoids some unwanted scene changes and speeds up the
first open a bit, also initialize the size of the dialog main item
so there is a resize less when the Dialog is first shown

Test Plan

difference in show time is already visible, tough still not perfect,
something else needs to improve as well

Diff Detail

R120 Plasma Workspace
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Feb 20 2018, 5:58 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 20 2018, 5:58 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.Feb 20 2018, 5:58 PM
mart updated this revision to Diff 27633.Feb 20 2018, 7:04 PM
  • forces delegates creation in the item view
davidedmundson added inline comments.

How does this avoid a useless Dialog resize?

346 ↗(On Diff #27633)

why did this need special code, but kicker (not kickoff) which also does its own didn't?

mart added inline comments.Feb 20 2018, 7:23 PM

otherwise mainItem starts being sized 0x0, then on Dialog showevent, it searches for its Layout property and resizes it based on that, this makes the resize being a noop which seems a sensible micro optimization

346 ↗(On Diff #27633)

ah, if kicker doesn't use expandedrepresentation then it's not done there, tough i feel that whether qwindow::create is actually useful or not really would need better profiling, which i'm not sure how to do

hein added a subscriber: hein.Feb 20 2018, 7:25 PM

It does use it btw, just not for subdialogs.

broulik added inline comments.
36 ↗(On Diff #27633)

Would that also help Kickoff's initial opening?

Also see D10557 which makes a huge difference without that..

mart added inline comments.Feb 21 2018, 11:53 AM
36 ↗(On Diff #27633)

yeah, pretty much everything that has a listview in it, tough i don't know how to do it without hacing this ugly thing into every applet

D10557 seems indeed to make a difference

mart updated this revision to Diff 27710.Feb 21 2018, 5:11 PM
  • less hacks on this part, ones in libplasma enough
mart added a comment.Feb 21 2018, 5:12 PM

now it depends from D10722, which can preload it

mart updated this revision to Diff 27715.Feb 21 2018, 5:38 PM
  • new approach: parent full reps to the dialog only when needed
apol added a subscriber: apol.Feb 22 2018, 2:41 AM
apol added inline comments.
30 ↗(On Diff #27715)


mart added inline comments.Feb 22 2018, 10:51 AM
30 ↗(On Diff #27715)

eww, leftover

mart updated this revision to Diff 27767.Feb 22 2018, 11:12 AM

remove leftovers

broulik added inline comments.Feb 22 2018, 5:18 PM

Shouldn't this be a binding?

mart added inline comments.Feb 22 2018, 5:23 PM

not really, as is just an inizialization to have the size it will have when properly reparented

when the popup is open, it's put in the StackView, so is them propely anchored and all

putting a binding here would just make things more complicated and potentially different things that want to resize the same thing at once

broulik accepted this revision.Feb 23 2018, 10:48 AM
This revision is now accepted and ready to land.Feb 23 2018, 10:48 AM
mart updated this revision to Diff 27840.Feb 23 2018, 10:52 AM
  • remove useless z reassignment
This revision was automatically updated to reflect the committed changes.