Kicker backend changes for Simple Menu.
ClosedPublic

Authored by hein on Dec 12 2016, 7:41 PM.

Details

Summary

This does two changes needed to support the Simple Menu UI:

  • Support for pagination with configurable page size and related API naming changes.
  • Make showing the Power / Session top-level category optional.

As well as adding inheritance from QQmlParserStatus to RootModel
to avoid startup churn.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hein updated this revision to Diff 8952.Dec 12 2016, 7:41 PM
hein retitled this revision from to Kicker backend changes for Simple Menu..
hein updated this object.
hein edited the test plan for this revision. (Show Details)
hein added reviewers: Plasma, mart.
hein added a subscriber: plasma-devel.
Restricted Application added a project: Plasma. · View Herald TranscriptDec 12 2016, 7:41 PM
hein added a comment.Dec 12 2016, 7:42 PM

Note: There seems to be unrelated borkage in master. Kicker-based UIs don't apply plasmoid XML default config correctly on applet instanciation now. It only works intermittently, as if it's some sort of new race condition. This happens with and without this change.

some minor minor nitpicks, +1 from me though

applets/kicker/plugin/rootmodel.cpp
281–282

i is already occupied by the outer loop?

293

Too bad there's no Qt container which keeps its custom order :)

308

reserve?

324–327

!isEmpty

applets/kicker/plugin/rootmodel.h
90

override

applets/kicker/plugin/wheelinterceptor.cpp
52

Is this for another patch?

Also, you lose pixel-precise scrolling here

hein updated this revision to Diff 8955.Dec 12 2016, 9:59 PM

Address Kai's review comments.

mart added inline comments.Dec 13 2016, 11:10 AM
applets/kicker/plugin/appentry.h
79

a constructor with a list of bool parameters doesn't look particularly good, but as i see was already like that before adding the paginate option, so is probably a bit late.. I would probably have seen bettea couple of different subclasses for different entries style? (same for the model)

applets/kicker/plugin/appsmodel.h
46–47

are all those parameters really needed right in the ctor?

hein added a comment.Dec 13 2016, 2:17 PM

Marco: Yeah I agree it's fugly. The constructor was originally added for atomicity and then it grew ove time. Let's refactor separately from this maybe though?

applets/kicker/plugin/wheelinterceptor.cpp
52

Forgot to mention this one in the description. It's used by the Simple Menu UI code to do page flips (hence pixel-precision is also not needed).

mart accepted this revision.Dec 13 2016, 2:32 PM
mart edited edge metadata.
This revision is now accepted and ready to land.Dec 13 2016, 2:32 PM
This revision was automatically updated to reflect the committed changes.