Add supportedSchemes feature
ClosedPublic

Authored by mwolff on Jan 22 2018, 3:58 PM.

Details

Summary

This addds a whitelist of supported URL schemes to the KFileWidget
to be used by KDEPlatformFileDialog. The whitelist is used by the
KFilePlacesModel and KDirOperator to filter the displayed contents.

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mwolff created this revision.Jan 22 2018, 3:58 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJan 22 2018, 3:58 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
mwolff requested review of this revision.Jan 22 2018, 3:58 PM
apol added a subscriber: apol.Jan 22 2018, 5:41 PM

Makes sense I guess.

Sounds like it would be useful to set this through kiosk, would that work?

src/filewidgets/kdiroperator.cpp
2651

only if d->supportedSchemes != schemes?

In D10024#194431, @apol wrote:

Makes sense I guess.

Sounds like it would be useful to set this through kiosk, would that work?

Probably, but I have zero experience about kiosk. I'd have to read the defaults from a settings file, is that it? Can you point me to where I should have a look?

mart accepted this revision.Jan 23 2018, 11:11 AM
mart added a subscriber: mart.

ship it with the extra check Aleix noted

This revision is now accepted and ready to land.Jan 23 2018, 11:11 AM
dfaure added inline comments.Jan 24 2018, 8:29 AM
src/filewidgets/kfilewidget.h
498

All of these public methods should indicate that the default list is *empty* and that empty means "all schemes are supported".
I don't want to see people thinking they have to call this for anything to work, since that would only lead to unnecessarily limiting the amount of supported schemes in all cases where there's no reason to limit that.

mwolff updated this revision to Diff 25891.Jan 24 2018, 3:52 PM

extend apidox, mention empty list == everything allowed

In D10024#194708, @mart wrote:

ship it with the extra check Aleix noted

Can you guys explain me more what would be required for KIOSK support?

@apol any hint what to do about KIOSK? any resources I should have a look at?

mwolff added a comment.Feb 6 2018, 9:49 AM

I've committed this now. If someone tells me how to add KIOSK support, I can add that later on as needed

This revision was automatically updated to reflect the committed changes.