[Interest] dragging from Qt (KDE) app onto Mac Finder and vice versa
René J. V. Bertin
rjvbertin at gmail.com
Mon Apr 20 23:01:11 CEST 2020
René J.V. Bertin wrote:
> Concretely: I have built KDE Dolphin for Mac, and find I can copy/move files
> by dragging them from the Finder and dropping them onto a destination folder
> in Dolphin (e.g. for copying to a remote server that isn't accessible through
> the Finder). For some reason the reverse operation doesn't work - and I assume
> that is not because of a limitation in Qt (or in the Finder). Or is it?
To answer my own question, in part: dragging from Dolphin onto a Finder window
actually works if the dragged URI uses the file:// scheme (I don't seem to have
control over whether the result is a copy or a move, but that's a different
issue).
After discovering the dropsite example and playing with it I realised that I had
misunderstood my problem. When I drag from a Dolphin window that connects to a
remote server with a non-standard protocol, that affects the dragged URI, e.g.
sftp://host/path/to/file for browsing remote files via an equivalent of sshfs, and
smb://host/path/to/file for browsing files on a remote Samba share. The Finder
doesn't support those protocols, so rejects the drop.
KDE uses "kioslaves" behind the scenes that act as impromptu file system drivers.
For "universal" drag support I would thus have to be able to obtain the target
of the drop (application and in this case, the target directory) and then
somehow cancel the drop event, converting it to the appropriate kioslave
invocation that will handle the copy or move.
But I suppose that there's no way to obtain the information required for this
kind of approach?
Thanks,
R.
More information about the Interest
mailing list