Skip to content

processcore: Make ApplicationDataModel aggregate similar CGroups into one entry

Arjen Hiemstra requested to merge work/ahiemstra/applicationmerge into master
  • processcore: Make ApplicationDataModel aggregate similar CGroups into one entry

This changes ApplicationDataModel to aggregate similar CGroups into one application entry.

The primary motivation for this is that a single Flatpak application instance may spawn several separate CGroups that we would list as separate applications before this change, but which logically belong to the same application. Upstream has indicated this behaviour is intentional and seems to have no inclination on adding anything to allow us to identify these cases, so we are left with just merging everything.

This is also slightly more aggressive in filtering out some things that are currently listed but aren't really applications, most notably some D-Bus autostarted applications.

BUG: 481551

  • processesfor

  • processcore: Add hooks for cgroup added/updated/removed to CGroupDataModel

This allows subclasses to react to CGroup changes and act accordingly.

  • processcore: Use processesFor() for returning the data of the PID role

processFor() is now virtual to allow subclasses to change its behaviour, which means we should use it wherever we're trying to get a list of processes, including the PIDs role.

  • processcore: Make processesFor() a protected virtual method

Move it from private into the main class and make it virtual so subclasses can change how lookup for processes happens.

  • processcore: Change CGroupDataModel::filterAcceptsRow() arg to CGroup*

This allows us to access more properties of the CGroup in filterAcceptsRow()

Merge request reports

Loading