This pulls the code out of KSysGuardProcessList and introduces it in a
new class called ProcessController. This should help make that code more
reusable and allow it to eventually be exposed to QML.
Details
- Reviewers
davidedmundson - Group Reviewers
Plasma - Commits
- R111:cb3ccfc6b3db: Move code to send signals and set priority of processes to a dedicated object
Start ksysguard, try to send signals to processes and set priorities, including
root-owned processes. Everything should still work.
Diff Detail
- Repository
- R111 KSysguard Library
- Branch
- processcontroller
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 15816 Build 15834: arc lint + arc unit
++
Looks nice and simplifies this old mega class
processcore/process_controller.h | ||
---|---|---|
89 | Eww, it would be better if we could make this a qwindow, but I see you're limited by current KAuth | |
processui/ksysguardprocesslist.cpp | ||
1316 | If we're invoking this from QML any call that spawns an event loop has the potential to crash. box = new KMessageBox() would probably help |
processcore/process_controller.h | ||
---|---|---|
89 | Agreed. I did look at what would be needed to do that, but the entire widget thing is embedded pretty deeply in KAuth. Luckily, for QML we can probably just leave this out. We won't get window modality, but that's the only drawback. I added this mostly so we don't have any regressions in the current UI. | |
processui/ksysguardprocesslist.cpp | ||
1316 | That's why the ProcessController does not have this code - my intention was to have the UI bits handled completely by QML, so you end up creating an instance of ProcessController, then just call sendSignal or whatever and get a result back, then QML can handle that result. This code is the ProcessList widget that we shouldn't be using in QML anyway. |