Add Shared Drives to GDriveUrl slave.
Needs ReviewPublic

Authored by barchiesi on Mon, Sep 9, 6:02 PM.

Details

Reviewers
elvisangelaccio
Summary

Adds listing of account Shared Drives through the url 'gdrive:/account@gmail.com/Shared Drives/'.

Supported operations:

  • Create via 'Create New' -> 'Folder...'
  • Delete (if empty)
  • Rename

Discussion in T10630: Show Team Drives

Diff Detail

Repository
R219 KIO GDrive
Branch
arcpatch-D23804
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16538
Build 16556: arc lint + arc unit
barchiesi requested review of this revision.Mon, Sep 9, 6:02 PM
barchiesi created this revision.
barchiesi edited the summary of this revision. (Show Details)Mon, Sep 9, 6:36 PM
barchiesi added a project: KIO GDrive.
barchiesi added a subscriber: KIO GDrive.

Here are some screenshots:

Account listing Shared Drives listing

elvisangelaccio requested changes to this revision.Sat, Sep 14, 4:11 PM
elvisangelaccio added inline comments.
src/gdriveurl.cpp
27

"Shared Drives" should be translated if possible.

src/kio_gdrive.cpp
363

Q_FOREACH is deprecated, please avoid it in new code.

376

Nitpick: opening brace goes to the next line

383

const

388

Missing pass-by-reference

Nitpick: opening brace goes to the next line

395

Missing pass-by-reference

Nitpick: opening brace goes to the next line

408

Redundant comment, info is already in the apidox of runJob.

412

Prefer at(0)

429–433

Can't we use runJob() here?

454

This comment should be just before the if()

522

Nitpick: else not needed after return

683

Typo: runJob

1172

"error() will have been called in case of error"

1245

runJob already called error() here, no?

src/kio_gdrive.h
95

const QString &; prefer enum instead of bool as arguments.

This revision now requires changes to proceed.Sat, Sep 14, 4:11 PM
barchiesi updated this revision to Diff 66066.Sat, Sep 14, 4:59 PM
barchiesi marked 12 inline comments as done.

First round of fixes.

barchiesi added inline comments.Sat, Sep 14, 5:12 PM
src/kio_gdrive.cpp
429–433

The desired behavior is silently failing if the user isn't allowed to create shared drives and being that runJob() will always call error(), it isn't used.

barchiesi updated this revision to Diff 66072.Sat, Sep 14, 5:35 PM
barchiesi marked 2 inline comments as done.

Remove deprecated Q_FOREACH and use enum in fetchSharedDrivesRootEntry() arguments.