D28113: Fix initial loading of autostart program names

Yichao Yu noreply at phabricator.kde.org
Wed Mar 18 03:07:31 GMT 2020


yuyichao created this revision.
yuyichao added reviewers: apol, davidedmundson.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
yuyichao requested review of this revision.

REVISION SUMMARY
  When the auto start entry is first loaded, the module only take into account
  the "Name" entry in the desktop file. However, after editing or when adding
  a new one, `KService::name` is used which uses the file name as a fallback.
  This causes the name to "mysteriously" appear and disappear when
  checking the setting or reopenning the setting page.
  
  This change fixes the issue by using the same function `KService::name`
  in all cases. This is less efficient but easier to maintain than
  duplicating the logic from `KService`.
  
  Also use the newly available `KService` instance to replace some of
  the manual reading of the desktop file.
  The handling of `NotShowIn` and `OnlyShowIn` are left in place since
  `KService::showInCurrentDesktop()` takes into account the current running
  environment rather than only `KDE`.
  Changing that behavior should be a separate issue.

TEST PLAN
  Tested on 5.18.3. Unable to test on master (5.18.80)

REPOSITORY
  R119 Plasma Desktop

BRANCH
  names (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28113

AFFECTED FILES
  kcms/autostart/autostart.cpp

To: yuyichao, apol, davidedmundson
Cc: plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200318/c7563107/attachment-0001.html>


More information about the Plasma-devel mailing list