[kicker] Never execute recent documents
ClosedPublic

Authored by aleksejshilin on Feb 25 2018, 2:46 PM.

Details

Summary

When one tried to open a recent document which happened to be
executable (a shell script, for example), it was run instead.
This was unexpected and could even be disastrous.

After this change, recent documents are always opened.

Diff Detail

Repository
R119 Plasma Desktop
Branch
always_open_recent_documents
Lint
No Linters Available
Unit
No Unit Test Coverage
aleksejshilin created this revision.Feb 25 2018, 2:46 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 25 2018, 2:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
aleksejshilin requested review of this revision.Feb 25 2018, 2:46 PM

Can you check whether this affects Task manager also?

Can you check whether this affects Task manager also?

Task Manager runs the corresponding application explicitly by its .desktop file, so it's not affected.

anthonyfieroni added inline comments.
applets/kicker/plugin/recentusagemodel.cpp
286

const

288
const QList<QUrl> urlsList{ resourceUrl };
294
if (service) {

So why not do the same here instead of offering "Open With"?

So why not do the same here instead of offering "Open With"?

Currently recent documents in application launchers (i.e. Kicker, Kickoff etc.) are opened in their default applications rather than the ones they were opened with back then. My intent was to prevent accidental execution, not to change the behavior.

If you think that current behavior should be changed so that recent documents are opened in the same applications, I'll implement it (in a new revision).

broulik added a subscriber: hein.Feb 27 2018, 7:05 AM

Stupid me, you're absolutely right. Looks good to me but please let @hein have the final word on this.

hein added a comment.Feb 27 2018, 7:08 AM

It looks good to me as well. I was waiting for Kai's concerns to get sorted out ;)

@aleksejshilin Do you have a contributor account to commit this or should we do it on your behalf? (Your authorship will be preserved, of course.)

In D10835#214865, @hein wrote:

Do you have a contributor account to commit this or should we do it on your behalf?

I have a contributor account, thanks.

I'll update the revision to address code style issues pointed out by @anthonyfieroni and will be ready to land it when it's accepted.

  • Use proper coding style
aleksejshilin marked 3 inline comments as done.Feb 27 2018, 8:30 AM

If there are no more concerns, could anyone actually accept the revision, please? :) Thanks in advance!

anthonyfieroni removed a subscriber: anthonyfieroni.
broulik accepted this revision.Mar 1 2018, 4:04 PM
This revision is now accepted and ready to land.Mar 1 2018, 4:04 PM
This revision was automatically updated to reflect the committed changes.