Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P Plasma Workspace
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 121
    • Merge requests 121
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • Plasma Workspace
  • Merge requests
  • !2571

notificationmanager: Don't store KFilePlacesModel in a weak pointer

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Arjen Hiemstra requested to merge work/ahiemstra/notification_places into master Feb 02, 2023
  • Overview 2
  • Commits 1
  • Pipelines 4
  • Changes 1

KFilePlacesModel is used to look up "pretty names" for jobs. It is quite expensive to construct. The current code tries to ensure there is a single instance around when there are jobs active, however because it uses a weak pointer for storage, when there is no job around, the model gets destroyed and we recreate it when there's a job again. To avoid this, just store it in a "strong" pointer so we create it once and it stays around.

While we're at it, switch to using std::shared_ptr like we've done in other places.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/ahiemstra/notification_places