Bug 469080

Summary: Kmail on flatpak doesn't use open file portal when trying to Attach file on composer
Product: [Applications] kmail2 Reporter: AndrĂ© M <andre.vmatos>
Component: composerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.23.0   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description André M 2023-04-27 22:53:21 UTC
SUMMARY
Portal integration is working e.g. to Save an Attachment, but when composing an e-mail, trying to Attach a file to the e-mail only shows up folders which have been allowed to kontact's flatpak (e.g. through Flatseal).


STEPS TO REPRODUCE
1. Don't export home/filesystem to Kontact on flatpak
2. Write an e-mail and click on Attach file

OBSERVED RESULT
Only allowlisted folders are shown

EXPECTED RESULT
XDG file portal allows to attach any folder in the system

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: NixOS unstable
(available in About System)
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105
Qt Version: 5.15.9

ADDITIONAL INFORMATION
Kontact's flatpak from Flathub
Comment 1 Carl Schwan 2024-05-03 23:29:20 UTC
Git commit 6a708022dc572819404b67cddfe1adcc61458a2e by Carl Schwan.
Committed on 03/05/2024 at 23:21.
Pushed by carlschwan into branch 'master'.

Remove usage of KEncodingFileDialog

This doesn't work anymore and users usually don't know that is the file
encoding of their file. Instead try to determine the encoding based on
the first MB and fallback to the system encoding if no encoding can be
determined automatically.

M  +29   -8    messagecomposer/src/attachment/attachmentcontrollerbase.cpp

https://invent.kde.org/pim/messagelib/-/commit/6a708022dc572819404b67cddfe1adcc61458a2e