[cli] Allow sharing files and URLs together
ClosedPublic

Authored by nicolasfella on Sep 26 2018, 11:25 PM.

Details

Summary

Depends on D15787

Restricting sharing multiple urls to files seems unnecessary to me.

Test Plan

kdeconnect-cli --share foo.txt google.com

Diff Detail

Repository
R224 KDE Connect
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Sep 26 2018, 11:25 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptSep 26 2018, 11:25 PM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
nicolasfella requested review of this revision.Sep 26 2018, 11:25 PM
nicolasfella retitled this revision from Allow sharing files and URLs together to [cli] Allow sharing files and URLs together.Sep 26 2018, 11:27 PM
apol accepted this revision.Sep 27 2018, 1:18 AM
apol added a subscriber: apol.
apol added inline comments.
cli/kdeconnect-cli.cpp
156

while at it, pass a third argument being QUrl::AssumeLocalFile. Otherwise sometimes it decides you want to share http://myfile.odt.

This revision is now accepted and ready to land.Sep 27 2018, 1:18 AM
nicolasfella added inline comments.Sep 27 2018, 4:22 PM
cli/kdeconnect-cli.cpp
156

But that would interpret google.com as a file, which is not what I would expect. If myfile.odt exists and is interpreted as http://myfile.odt that would be a bug in Qt. If myfile.odt doesn't exist it doesn't make sense sharing it, does it?

apol added inline comments.Sep 28 2018, 1:12 AM
cli/kdeconnect-cli.cpp
156

Maybe, but the fact that Qt has bugs doesn't make our life easier. Or leave it like that and we can test later.

This revision was automatically updated to reflect the committed changes.

No strong opinions about this change, but I don't expect google.com to be interpreted as a URL actually.