Expose rowCount as data role in TaskGroupingProxyModel.
ClosedPublic

Authored by hein on Nov 24 2016, 9:36 AM.

Details

Summary

This adds a new data role "ChildCount" to AbstractTasksModel and
implements it in TaskGroupingProxyModel.

The purpose of this data role is as a means of signalling to a Qt
Quick delegate for a top-level row that a property of the item -
namely the number of children it has - has changed. Qt Quick's poor
support for tree models makes the existing way of signaling this
(rowsInserted) prohibitive to use.

The Task Manager applet needs this info because it's in charge of
telling the window manager about the screen coordinates of window
delegates (through support code in this library). When a window is
directly added to an existing group, there is no new delegate
created, nor does the existing delegate change position. An
increase of ChildCount will be used in this case to decide to
publish delegate geo for the new window.

CCBUG:372699

Diff Detail

Repository
R120 Plasma Workspace
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 8470.Nov 24 2016, 9:36 AM
hein retitled this revision from to Expose rowCount as data role in TaskGroupingProxyModel..
hein updated this object.
hein edited the test plan for this revision. (Show Details)
hein added reviewers: Plasma, davidedmundson.
hein added a subscriber: plasma-devel.
Restricted Application added a project: Plasma. · View Herald TranscriptNov 24 2016, 9:36 AM
mart accepted this revision.Nov 24 2016, 10:47 AM
mart added a reviewer: mart.
This revision is now accepted and ready to land.Nov 24 2016, 10:47 AM
This revision was automatically updated to reflect the committed changes.