martijnschmidt (Martijn Schmidt)
User

Projects

User does not belong to any projects.

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Thursday

  • Clear sailing ahead.

User Details

User Since
Jan 4 2018, 7:02 PM (331 w, 4 d)
Availability
Available

Recent Activity

Apr 27 2018

martijnschmidt requested review of D12566: Correct various typos in the comments and Mainpage.dox.
Apr 27 2018, 8:45 PM · KDE PIM, LibKGAPI

Mar 20 2018

martijnschmidt added a comment to D9806: KIOGDrive::copy - resolve the destGDriveUrl's new parent into a destDirId before passing it to FileCopyJob in src/kio_gdrive.cpp.

@elvisangelaccio was this one committed, since it mentions FIXED-IN: 1.2.2 in the Differential summary but I don't see the commit in the Differential log?

Mar 20 2018, 11:28 PM · KIO GDrive

Feb 11 2018

martijnschmidt updated the test plan for D9806: KIOGDrive::copy - resolve the destGDriveUrl's new parent into a destDirId before passing it to FileCopyJob in src/kio_gdrive.cpp.
Feb 11 2018, 12:50 PM · KIO GDrive
martijnschmidt added a comment to D9806: KIOGDrive::copy - resolve the destGDriveUrl's new parent into a destDirId before passing it to FileCopyJob in src/kio_gdrive.cpp.

I'm not sure I'm following: all the 3 steps in the test plan work for me, without this patch.
Is there something else needed to trigger the bug?

Feb 11 2018, 12:37 PM · KIO GDrive

Feb 6 2018

martijnschmidt updated subscribers of D9806: KIOGDrive::copy - resolve the destGDriveUrl's new parent into a destDirId before passing it to FileCopyJob in src/kio_gdrive.cpp.
Feb 6 2018, 7:24 PM · KIO GDrive
martijnschmidt added a comment to D9706: MIME type correction for .ods files in src/gdrivehelper.cpp.

While technically all your observations are correct, when dealing with data coming from a proprietary service where we cannot do any assumptions about their implementation, it's better to write the code defensively and not just assume that the way things happen to work now is set to stone. Our only guideline is the API documentation. Any other observations about the data I prefer to treat as a coincidence that happens to work for me and the few documents on my GDrive, but may break in the real world.

Feb 6 2018, 7:23 PM · KIO GDrive
martijnschmidt updated the diff for D9706: MIME type correction for .ods files in src/gdrivehelper.cpp.

Implement @dvratil's recommended code changes per D9706#188708 and document the reasoning behind the extra safeguard as comments in the code.

Feb 6 2018, 7:20 PM · KIO GDrive

Feb 5 2018

martijnschmidt added inline comments to D9775: Trash behaviour improvements: check for the amount of parentReference items on a fileId before processing the delete command in src/kio_gdrive.cpp.
Feb 5 2018, 12:41 AM · KIO GDrive

Feb 4 2018

martijnschmidt added a comment to D9706: MIME type correction for .ods files in src/gdrivehelper.cpp.

Hey @elvisangelaccio, please accept my apologies for the delay - I needed some time to understand the code due to my sheer lack of experience, since I'd like to to grasp why a certain change is being recommended rather than blindly implementing it. After reading through the relevant chunk of code again I now understand and agree with @dvratil's recommended change, but I do have two additional questions.

Feb 4 2018, 3:59 PM · KIO GDrive
martijnschmidt added inline comments to D9775: Trash behaviour improvements: check for the amount of parentReference items on a fileId before processing the delete command in src/kio_gdrive.cpp.
Feb 4 2018, 11:29 AM · KIO GDrive

Jan 20 2018

martijnschmidt added a comment to D9774: Check for the correct "kind" strings in src/drive/parentreference.cpp and src/drive/app.cpp .

@martijnschmidt What's the email you want to use for the commit authorship?

Jan 20 2018, 10:30 PM · KDE PIM

Jan 10 2018

martijnschmidt added inline comments to D9775: Trash behaviour improvements: check for the amount of parentReference items on a fileId before processing the delete command in src/kio_gdrive.cpp.
Jan 10 2018, 1:04 PM · KIO GDrive
martijnschmidt added a comment to D9774: Check for the correct "kind" strings in src/drive/parentreference.cpp and src/drive/app.cpp .

I don't have commit rights - this is my 2nd KDE patch ever, so please go ahead and push it to the repository. Thanks! :)

Jan 10 2018, 12:54 PM · KDE PIM

Jan 9 2018

martijnschmidt added a comment to D9706: MIME type correction for .ods files in src/gdrivehelper.cpp.

For documents created in Google Docs, GDrive API will list them as GDocs documents, which nobody else but GDocs can open. It, however, provides a list of mimetypes into which GDocs can convert the document for download. The code here is used so that we can show GDocs documents as .odt/.ods/.pdf/.... documents that users can click and open in their computer.

As such, the mappings here are used to map from the mimetypes in externalLinks to some usable mimetype. Since Google still documents the "broken" mimetype as used, we should keep it supported, alongside the correct one.

Jan 9 2018, 11:03 PM · KIO GDrive
martijnschmidt added a comment to T3443: Make Trash work again.

I've uploaded two Differentials for this task;

Jan 9 2018, 9:46 PM · KIO GDrive
martijnschmidt added a revision to T3443: Make Trash work again: D9775: Trash behaviour improvements: check for the amount of parentReference items on a fileId before processing the delete command in src/kio_gdrive.cpp.
Jan 9 2018, 9:32 PM · KIO GDrive
martijnschmidt added a task to D9775: Trash behaviour improvements: check for the amount of parentReference items on a fileId before processing the delete command in src/kio_gdrive.cpp: T3443: Make Trash work again.
Jan 9 2018, 9:32 PM · KIO GDrive
martijnschmidt added a task to D9774: Check for the correct "kind" strings in src/drive/parentreference.cpp and src/drive/app.cpp : T3443: Make Trash work again.
Jan 9 2018, 8:52 PM · KDE PIM
martijnschmidt added a revision to T3443: Make Trash work again: D9774: Check for the correct "kind" strings in src/drive/parentreference.cpp and src/drive/app.cpp .
Jan 9 2018, 8:52 PM · KIO GDrive

Jan 8 2018

martijnschmidt added a comment to T3443: Make Trash work again.

From the KGAPI perspective, looking at the V2->V3 API migration guide (https://developers.google.com/drive/v3/web/migration) it appears that it should not be too much work to add V3 API to KGAPI for KIO GDrive to use.

The migration document also mentions some changes in parent handling that might make it actually easier to deal with the parent changes.

Regarding the Trash, the change in V3 is that it's no longer an actual folder that can be referenced from the API but simply just a collection of all Files with the trashed parameter set to true. My understanding is that there is still Trash in V3, but it's up to the implementators to create it themselves and only show trashed files in it. You can list all trashed files via

GET https://www.googleapis.com/drive/v3/files?q=trashed%3Dtrue&key={YOUR_API_KEY}

So trashing items should only be a matter of updating the file's trashed property.

Ahh, I had completely missed that. So looking at the v3 API we should do something like the following to move the file to trash:

PATCH https://www.googleapis.com/drive/v3/files/fileId
{
  "trashed": true
}
Jan 8 2018, 8:18 PM · KIO GDrive
martijnschmidt added a comment to D9706: MIME type correction for .ods files in src/gdrivehelper.cpp.

Hi Elvis, I ran a diff -u a/src/gdrivehelper.ccp b/src/gdrivehelper.cpp to create this output.

git diff from the kio-gdrive repo should be enough

Jan 8 2018, 8:03 PM · KIO GDrive
martijnschmidt updated the diff for D9706: MIME type correction for .ods files in src/gdrivehelper.cpp.

Re-export the diff with "git diff" instead of "diff -u".

Jan 8 2018, 7:46 PM · KIO GDrive

Jan 7 2018

martijnschmidt added a comment to D9706: MIME type correction for .ods files in src/gdrivehelper.cpp.

Hi Elvis, I ran a diff -u a/src/gdrivehelper.ccp b/src/gdrivehelper.cpp to create this output.

Jan 7 2018, 8:21 PM · KIO GDrive
martijnschmidt added a comment to T3443: Make Trash work again.

Looking at your comments in the code with regard to trash:

Jan 7 2018, 4:34 PM · KIO GDrive

Jan 5 2018

martijnschmidt added a comment to T3443: Make Trash work again.

It looks like the whole trash feature is no longer made available in the Google Drive API v3: https://developers.google.com/drive/v3/reference/files

Jan 5 2018, 5:04 PM · KIO GDrive