When right clicking on a Google Drive file or folder, show a 'Copy Google URL to clipboard' context menu action.
Details
Diff Detail
- Repository
- R219 KIO GDrive
- Branch
- copy_url_action
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 16376 Build 16394: arc lint + arc unit
@elvisangelaccio care to answer the following?
src/CMakeLists.txt | ||
---|---|---|
51–54 | Is this the correct way of reusing the same logging category? | |
src/copyurlitemaction.cpp | ||
77 | How should this error be handled? A notification perhaps? |
src/CMakeLists.txt | ||
---|---|---|
51–54 | It works so it's not "wrong". The alternative is to create a private library with all the gdrive sources and link the new plugin to this library. That would also avoid to build gdriveurl.cpp twice, which this patch currently does. Question: do we really need debug in this plugin? Maybe it can be avoided. Question 2: do we really need the GDriveUrl class here? It's basically used only to compare the scheme with the "gdrive" string... | |
src/copyurlitemaction.cpp | ||
69 | Why are we stating the URL again? We already have the KFileItem for it which can give us access to its UDSEntry object. | |
74 | This doesn't seem to work on Wayland. Haven't tested on X11 yet. | |
src/copyurlitemaction.json | ||
9 | Please do not add translations manually, they will be added by a bot when ready. | |
src/gdriveurl.h | ||
33 | IMHO this is overkill, we can just use UDS_EXTRA in the fastInsert() call. |
Removed unnecessary stat(), removed translations, replaced UDS_ALTERNATE_LINK_FIELD with UDS_EXTRA.
src/CMakeLists.txt | ||
---|---|---|
51–54 | In this scenario I guess usage of both debug and GDriveUrl can be avoided, however the private library might need to be considered. In the future I would like to add a way to change file permissions after right clicking and to do so I will very probably need access to other parts of kio-gdrive. Any ideas? | |
src/copyurlitemaction.cpp | ||
74 | I just tried it out simply selecting "Plasma (Wayland)" in SDDM and it seems to work, I think the bug is elsewhere. What were you right clicking on? |
src/CMakeLists.txt | ||
---|---|---|
51–54 | I would create the library when we cannot actually avoid it. Simple as that :) | |
src/copyurlitemaction.cpp | ||
48 | Missing const; prefer at(0). | |
63 | I'd call it "Copy Google URL to clipboard", since it can be a "drive" url (drive.google.com) but also a "document" url (docs.google.com). | |
74 | Nevermind, it works. It just doesn't show up in the clipboard plasmoid, but that's surely not a bug introduced by this patch. |
src/copyurlitemaction.cpp | ||
---|---|---|
69 | Can the link be empty? In this case we might not show the action at all. |
src/CMakeLists.txt | ||
---|---|---|
51–54 | I removed debug and GDriveUrl class from this plugin. | |
src/copyurlitemaction.cpp | ||
74 | Ah, then in that case it probably has something to do with T4449: [kwayland] Clipboard Manager protocol |
Remove unnecessary includes, use QGuiApplication instead of QApplication, use QLatin1String for string comparison, fix name in service descriptor.