Bug 495552

Summary: Drag-and-drop to the app doesn't work when it's packaged as a Flatpak
Product: [Applications] NeoChat Reporter: Nate Graham <nate>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED FIXED    
Severity: normal CC: carl, josh, kimiblock, nicolas.fella
Priority: NOR    
Version First Reported In: 24.08.2   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Nate Graham 2024-10-29 22:04:46 UTC
Presumably due to a lack of implementation of the org.freedesktop.portal.FileTransfer portal: https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.FileTransfer.html

Can be worked around by giving the app access to all user files, but this is insecure, non-ideal, and will make the app's page show a nastygram about it.
Comment 1 Joshua Goins 2024-11-09 23:56:10 UTC
While I appreciate the bug report, this isn't really actionable on NeoChat's end. Is there a better place to put this, xdg-desktop-portal-kde maybe?
Comment 2 Nate Graham 2024-11-12 15:51:03 UTC
Ahh, I hadn't realized we don't yet implemented in our portal. I thought we did but NeoChat simply hadn't added support for it yet.
Comment 3 Nate Graham 2024-11-12 15:52:44 UTC
Marking as blocked by Bug 496181.
Comment 4 Nicolas Fella 2024-11-12 16:37:31 UTC
There's nothing missing in xdg-desktop-portal-kde.

Neochat needs to use the KUrlMimeData API, or wait for Qt to get support for this (https://codereview.qt-project.org/c/qt/qtbase/+/513987)
Comment 5 Joshua Goins 2024-11-12 18:15:58 UTC
(In reply to Nicolas Fella from comment #4)
> There's nothing missing in xdg-desktop-portal-kde.
> 
> Neochat needs to use the KUrlMimeData API, or wait for Qt to get support for
> this (https://codereview.qt-project.org/c/qt/qtbase/+/513987)

From your PoV, what would be more sensible right now? In my opinion, this feels like a failure of the integration between Qt and Flatpak's here from an application programmer PoV. But maybe just using KUrlMimeData to fix this in the meantime is okay enough. It doesn't look like the Qt CR is making much progress recently...
Comment 6 Bug Janitor Service 2025-11-10 16:54:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/2526
Comment 7 Tobias Fella 2025-11-25 10:37:38 UTC
Git commit 38523c97c51ed9c66179613f62a2cbc7d2369c78 by Tobias Fella, on behalf of Tobias Fella.
Committed on 25/11/2025 at 10:27.
Pushed by tfella into branch 'master'.

Implement drag&drop support for flatpaks

M  +0    -1    src/app/qml/RoomPage.qml
M  +17   -0    src/libneochat/chatbarcache.cpp
M  +2    -0    src/libneochat/chatbarcache.h
M  +1    -7    src/timeline/TimelineView.qml

https://invent.kde.org/network/neochat/-/commit/38523c97c51ed9c66179613f62a2cbc7d2369c78