Details
- Reviewers
broulik davidedmundson - Commits
- R309:0d86f5dd7984: KServiceAction: store parent service
This allows KIO::ApplicationLauncherJob to find the icon and name of
the parent service when executing a KServiceAction.
test passes, kio port works
Diff Detail
- Repository
- R309 KService
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 24361 Build 24379: arc lint + arc unit
| src/services/kserviceaction.cpp | ||
|---|---|---|
| 50 | You can just delegate to the new constructor | |
is leaked because both and hold strong references to each other. In other words, when you destroy a with actions, you always leak a bit of memory. At the moment, I'm not sure how to resolve the issue without breaking the API compatibility.
Hmm, turn into a raw pointer? Not sure the action can outlive its parent service?
In D28367#691880, @dfaure wrote:Hmm, turn into a raw pointer? Not sure the action can outlive its parent service?
Not sure about it either. Given the current API, you can pass KServiceAction around and be able to access the corresponding KService.
KDesktopFileAction solves such a problem by storing the desktop file path instead.
Revision Contents
| Path | Packages | |||
|---|---|---|---|---|
| M | autotests/kservicetest.cpp (1 line) | |||
| M | src/services/kservice.cpp (11 lines) | |||
| M | src/services/kserviceaction.h (24 lines) | |||
| M | src/services/kserviceaction.cpp (22 lines) |
| Commit | Tree | Parents | Author | Summary | Date |
|---|---|---|---|---|---|
| b87f19a17945 | 60f4d7eb4d3d | 36933c59d558 | David Faure | KServiceAction: store parent service (Show More…) | Mar 27 2020, 10:39 PM |
