libtaskmanager: fix launch url for startup info with pathless desktop file
ClosedPublic

Authored by kossebau on Aug 25 2019, 5:11 AM.

Details

Summary

Also drop checking if the suffix exists, the code is only reached
because this condition has been checked before

Seen while browsing code, no app known to me which would set a non-absolute
desktop file.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Aug 25 2019, 5:11 AM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 25 2019, 5:11 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kossebau requested review of this revision.Aug 25 2019, 5:11 AM
davidedmundson accepted this revision.Aug 26 2019, 9:30 AM
davidedmundson added a subscriber: davidedmundson.

:/ good catch.

libtaskmanager/startuptasksmodel.cpp
178

I quite like doing

appId.chop(strlen(".desktop"))

then it's self documenting - strlen is magical and evaluates at compile time.

This revision is now accepted and ready to land.Aug 26 2019, 9:30 AM
This revision was automatically updated to reflect the committed changes.