Depends on D1721.
Details
- Reviewers
davidedmundson lbeltrame graesslin - Group Reviewers
Plasma - Commits
- R120:8fd9770b50ec: Import next-gen libtaskmanager.
R871:8fd9770b50ec: Import next-gen libtaskmanager.
Diff Detail
- Repository
- R120 Plasma Workspace
- Branch
- importlibtmng
- Lint
No Linters Available - Unit
No Unit Test Coverage
libtaskmanager/abstracttasksmodel.h | ||
---|---|---|
63 ↗ | (On Diff #4083) | I improved the comment. |
75 ↗ | (On Diff #4083) | Changed. |
87 ↗ | (On Diff #4083) | Done. |
90 ↗ | (On Diff #4083) | Done. |
libtaskmanager/activityinfo.cpp | ||
55 ↗ | (On Diff #4083) | Done, also in TasksModel. |
69 ↗ | (On Diff #4083) | Implemented. |
libtaskmanager/launchertasksmodel.cpp | ||
126 ↗ | (On Diff #4083) | Changed it ... |
libtaskmanager/launchertasksmodel.h | ||
61 ↗ | (On Diff #4083) | Done. |
libtaskmanager/startuptasksmodel.cpp | ||
64 | Done. | |
182 | Done. | |
196 | Done. | |
238 | Done. | |
242 | Done. | |
146 ↗ | (On Diff #4083) | Done. |
libtaskmanager/taskfilterproxymodel.h | ||
124 | Superceded by David's review, fixed. | |
libtaskmanager/xwindowtasksmodel.cpp | ||
95 | Done. |
libtaskmanager/xwindowtasksmodel.cpp | ||
---|---|---|
434 | Done. |
Don't open taskmanagerrulesrc every time, keep KConfig around and call
reparseConfiguration when a KDirWatch calls for it.
libtaskmanager/xwindowtasksmodel.cpp | ||
---|---|---|
756 | Done now. |
Add a property for whether any task demands attention.
This will be used by the applet to update the applet status, which
factors into e.g. auto-hide. This used to be done with a mix of JS
in the applet and in the applet C++ backend, but it can be done more
efficiently and correctly in the lib.
Consider app id equivalence when matching up launchers and windows as well.
Helps with .desktop files that move in the XDG hierarchy, e.g. on menu edits.
Wipe app data caches on KSycoca changes and emit data changes.
This means e.g. launcher and window buttons will get new icons when
the icon is changed via kmenuedit. This is probably the first time
ever this has worked in KDE/Plasma.
libtaskmanager/waylandtasksmodel.cpp | ||
---|---|---|
116–120 ↗ | (On Diff #4083) | at the point of adding a window you can be quite sure that the appId is not yet pushed. Maybe we should introduce a dedicated event in the protocol to signal that the initial known data is pushed to the client. That's e.g. how Output does it. Which could be nice to ensure that the task model doesn't start adding any elements before it knows what to do with it. Also for the case that the window is already unmapped. |
234 ↗ | (On Diff #4083) | shouldn't you check whether the index is valid? |
245–247 ↗ | (On Diff #4083) | WaylandTasksModel::~WaylandTasksModel() = default; |
257 ↗ | (On Diff #4083) | any specific reason why you use an if-else structure instead of a switch? |
360 ↗ | (On Diff #4083) | there is no global timestamp like on X11 on Wayland. Timestamps are only used for frame rendered callbacks and on input events. Both are defined to have an undefined base and there is nowhere specified that they have the same base. |
491 ↗ | (On Diff #4083) | why don't you use the namespace more globally? |
libtaskmanager/xwindowtasksmodel.cpp | ||
116 ↗ | (On Diff #4083) | why not KSharedConfig::openConfig? |
119 ↗ | (On Diff #4083) | coding style nitpick: missing space between foreach and ( |
169 ↗ | (On Diff #4083) | you are connecting to a deprecated signal. see https://api.kde.org/frameworks/kwindowsystem/html/classKWindowSystem.html#ac8d368d83fa5e137f38e7c885d9a18ce |
199 ↗ | (On Diff #4083) | coding style nitpick: missing whitespace |
420 ↗ | (On Diff #4083) | I don't understand this valid check. Why are you inserting non valid KWindowInfo into the cache in the first place? |
libtaskmanager/waylandtasksmodel.cpp | ||
---|---|---|
116–120 ↗ | (On Diff #4083) | I've added a FIXME until we figure that out. |
234 ↗ | (On Diff #4083) | If this check were necessary, something else would be broken somewhere. dataChanged() is called with window instances which are in the list, so indexOf will return something sensible. index() then can't fail because hasIndex() just does a bounds check against rowCount() (which operates on the same list) before calling createIndex() (which doesn't really do anything with data). So the index could only be invalid if dataChanged() were called with a window that's not in Private::windows, which makes no sense. |
245–247 ↗ | (On Diff #4083) | Ok. |
257 ↗ | (On Diff #4083) | Not really. |
360 ↗ | (On Diff #4083) | Removed FIXME. |
491 ↗ | (On Diff #4083) | No particular reason. Might change as the code evolves. |
libtaskmanager/xwindowtasksmodel.cpp | ||
116 ↗ | (On Diff #4083) | Changed. |
119 ↗ | (On Diff #4083) | Ok. |
169 ↗ | (On Diff #4083) | Changed. |
199 ↗ | (On Diff #4083) | Ok. |
420 ↗ | (On Diff #4083) | Paranoia. I'm not inserting invalid ones into the cache, but I figured if there's a valid() it would be a good idea to call it before using it, so that block checked valid() and evicted if false. I've removed the block now. |
Doesn't build here (posted to D1721 by mistake):
/home/abuild/rpmbuild/BUILD/plasma-workspace-5.6.90git~20160602T115930~0d0c4f4/libtaskmanager/taskgroupingproxymodel.cpp:40:19: error: field 'blacklistedAppIds' has incomplete type 'QSet<QString>'
--- libtaskmanager/taskgroupingproxymodel.cpp.orig 2016-06-03 14:45:46.798676712 +0200 +++ libtaskmanager/taskgroupingproxymodel.cpp 2016-06-03 14:46:00.378760824 +0200 @@ -22,6 +22,8 @@ #include "abstracttasksmodel.h" #include "tasktools.h" +#include <QSet> + namespace TaskManager {
This fixes it for me. Feel free to make more appropriate changes.
Evict window info cache on WMGeometry changes.
This fixes stale data being returned for AbstractTasksModel::Screen.
Should fix Luca's bug mentioned in D1724.
Plasma addons don't build against this change:
/home/abuild/rpmbuild/BUILD/kdeplasma-addons-5.6.90git~20160524T120553~7d85a2c/applets/activitypager/plugin/activitypager.cpp:53:30: fatal error: taskmanager/task.h: No such file or directory