Refactor kio_gdrive to make use of new GDriveUrl functionalities
ClosedPublic

Authored by barchiesi on May 1 2019, 5:24 PM.

Details

Summary

D20064 enhances GDriveUrl with new constants and some of the same logic used in KIOGDrive. This patch refactors KIOGDrive to make use of it.

Diff Detail

Repository
R219 KIO GDrive
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
barchiesi requested review of this revision.May 1 2019, 5:24 PM
barchiesi created this revision.
barchiesi updated this revision to Diff 57335.May 1 2019, 5:29 PM

Add commit to revision.

barchiesi updated this revision to Diff 58311.May 19 2019, 4:58 PM

Updated after changes to D20064

barchiesi set the repository for this revision to R219 KIO GDrive.May 19 2019, 4:58 PM
src/kio_gdrive.cpp
84

I wouldn't bother with this honestly. I think it's better to be explicit here (also to keep consistency with other kioslaves).

889

This variable is actually useless, we could just use destGDriveUrl.filename() in the setTitle() call below.

1056–1058

Same here, just use:

destFile->setTitle(destGDriveUrl.filename());
elvisangelaccio accepted this revision.May 25 2019, 5:05 PM
This revision is now accepted and ready to land.May 25 2019, 5:05 PM
This revision was automatically updated to reflect the committed changes.