Handle spawning kinfocenter with a full path
ClosedPublic

Authored by davidedmundson on Feb 3 2020, 5:44 PM.

Details

Summary

/usr/bin/kinfocenter doesn't match "kinfocenter"

it also cannot be using as the binaryName in the rest of this method.

Test Plan

Launched
systemsettings5
kinfocenter
/opt/kde5/bin/kinfocenter

Diff Detail

Repository
R124 System Settings
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Feb 3 2020, 5:44 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 3 2020, 5:44 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Feb 3 2020, 5:44 PM
ngraham accepted this revision.Feb 3 2020, 5:59 PM
ngraham added a subscriber: ngraham.

Nice fix.

This revision is now accepted and ready to land.Feb 3 2020, 5:59 PM
pino added a subscriber: pino.Feb 3 2020, 6:11 PM
pino added inline comments.
app/main.cpp
42

This will consider also /usr/bin/my-kinfocenter as kinfocenter, which is definitely not what you want.

If you run /usr/bin/my-kinfocenter you wouldn't spawn this executable in the first place

pino added a comment.Feb 3 2020, 6:18 PM

If you run /usr/bin/my-kinfocenter you wouldn't spawn this executable in the first place

Hello symlink my old friend...

If you manually create a symlink called my-kinfocenter that points to systemsettings then clearly you're actually trying to make kinfocenter open just with a different binary name for your own convenience, so this new code is actually more correct.

Hello symlink my old friend...

Well sure, but not from something we ship.
We don't "definitely" want systemsettings mode either, and it has to be one of the two.

Right now it's definitely broken.

@pino do you have any viable counter proposals?

I'm going to ship this as it fixes an easy to hit bug that is definitely wrong.
I'm not trying to ingore any other proposals, we can always expand and change.

This revision was automatically updated to reflect the committed changes.