Make sure there's not a path within the filename
ClosedPublic

Authored by apol on Oct 2 2017, 11:24 AM.

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.
apol created this revision.Oct 2 2017, 11:24 AM
aacid added inline comments.Oct 2 2017, 5:34 PM
plugins/share/shareplugin.cpp
69

0 as a QString?

apol added inline comments.Oct 2 2017, 11:30 PM
plugins/share/shareplugin.cpp
69

Woa.. x'D Well I guess it technically translates to (const char*) nullptr?
Fixing.

apol marked 2 inline comments as done.Oct 2 2017, 11:32 PM
albertvaka requested changes to this revision.Oct 3 2017, 6:30 PM
albertvaka added a subscriber: albertvaka.
albertvaka added inline comments.
plugins/share/shareplugin.cpp
65–71

Make this function static. Also, I think you want to return filename instead of QString(). If I understand correctly, if there is no '/' at all in the filename, now it returns empty string.

This revision now requires changes to proceed.Oct 3 2017, 6:30 PM
albertvaka added inline comments.Oct 3 2017, 6:30 PM
plugins/share/shareplugin.cpp
65–71

Oh, it's not a member function. Ignore the static thing.

albertvaka accepted this revision.Oct 5 2017, 2:02 PM
This revision is now accepted and ready to land.Oct 5 2017, 2:02 PM
This revision was automatically updated to reflect the committed changes.