Make powerdevil normal executable instead of kded module
ClosedPublic

Authored by bshah on Aug 8 2016, 12:50 PM.

Details

Summary

This will allow kwin to grant permission to powerdevil which no other
application should have. Previously used kded module is now replaced by
the application which installs in LIBEXEC dir and started by desktop
file in /etc/xdg/autostart

Test Plan

Restarted session, powerdevil starts and all functions work perfectly

Diff Detail

Repository
R122 Powerdevil
Branch
powerdevil-executable (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
bshah updated this revision to Diff 5741.Aug 8 2016, 12:50 PM
bshah retitled this revision from to Make powerdevil normal executable instead of kded module.
bshah updated this object.
bshah edited the test plan for this revision. (Show Details)
bshah added reviewers: Plasma, broulik, graesslin.
Restricted Application added a project: Plasma. · View Herald TranscriptAug 8 2016, 12:50 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
bshah added a comment.Aug 8 2016, 1:27 PM

Something is wrong with this on wayland, I don't see battery and brightness applet and powerdevil executable seems to exit safely if I remove it.. Here is log of powerdevil executable https://ptpb.pw/9Jtd..

shumski added a subscriber: shumski.Aug 8 2016, 2:41 PM
shumski added inline comments.
daemon/CMakeLists.txt
135 ↗(On Diff #5741)

PowerDevil isn't a Framework, so this var is wrong.

daemon/powerdevil.desktop.cmake
1 ↗(On Diff #5741)

Maybe autostart for this should be limited to Plasma only?

bshah updated this revision to Diff 5749.Aug 9 2016, 3:40 AM
bshah marked 2 inline comments as done.
  • Don't install in kf5 libexec dir
  • Autostart powerdevil only in KDE
  • Make PowerDevilApp QGuiApplication instead of QObject
bshah planned changes to this revision.Aug 9 2016, 6:20 AM

I just realized that this breaks the shortcuts, and I need to migrate older shortcuts over.

bshah updated this revision to Diff 5751.Aug 9 2016, 7:05 AM

read shortcuts from kded5 component, unfortunately its close to impossible to migrate shortcuts using kconf_update

davidedmundson added inline comments.
daemon/powerdevilapp.cpp
137 ↗(On Diff #5741)

Should it have KCrash::setFlags(AutoRestart) ?

bshah updated this revision to Diff 5758.Aug 9 2016, 9:18 AM

fix powerdevil exiting on wayland

bshah updated this revision to Diff 5759.Aug 9 2016, 9:34 AM
bshah marked an inline comment as done.
  • Make it autorestart on crash
  • Make it unique so there are not multiple powerdevil
bshah updated this revision to Diff 5763.Aug 9 2016, 10:13 AM

set desktopSettingsAware to false

bshah added a comment.Aug 9 2016, 10:16 AM

mark comments as done

broulik accepted this revision.Aug 9 2016, 12:50 PM
broulik edited edge metadata.
This revision is now accepted and ready to land.Aug 9 2016, 12:50 PM
This revision was automatically updated to reflect the committed changes.