https://bugs.kde.org/show_bug.cgi?id=526482
Bug ID: 526482
Summary: Copy To / Move To / Link To with multiple images:
destination dialog is opened in save mode, cannot pick
a folder
Classification: Applications
Product: gwenview
Version First 26.04.3
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 196735
--> https://bugs.kde.org/attachment.cgi?id=196735&action=edit
Save dialog shown for multiple images
STEPS TO REPRODUCE
1. Open a folder in Gwenview's browse mode and select two or more images.
2. Right-click -> Copy To... (same for Move To... and Link To...).
3. Try to choose a destination folder.
OBSERVED RESULT
- Flatpak (xdg-desktop-portal-kde): the dialog behaves like a save dialog and
asks for a file name; the Copy button stays disabled, so the operation cannot
be completed.
- With the GTK dialog (QT_QPA_PLATFORMTHEME=gtk3): same save dialog with a
"Name" field; Copy is only enabled when the field happens to contain text.
- Native KDE dialog (reported on
https://discuss.kde.org/t/gwenview-moving-multiple-files/48601): after entering
a folder from the file view, the "Name:" field changes to that folder's name
and the images are not moved.
EXPECTED RESULT
A folder chooser; the selected images are copied/moved/linked into the chosen
folder.
CAUSE
app/fileoperations.cpp, copyMoveOrLink(): the dialog is always created with
setAcceptMode(QFileDialog::AcceptSave). For multiple images it is switched to
setFileMode(QFileDialog::Directory) + ShowDirsOnly, but stays in save mode.
Choosing a directory is an open operation; portal and GTK dialogs do not
support save mode combined with directory mode.
PROPOSED FIX
Use QFileDialog::AcceptOpen when more than one image is selected (a single
image keeps save mode, because the user may rename the target there). One-line
change; I will open a merge request.
Tested: Gwenview 26.04.3 built from the Flathub manifest with this change,
Plasma 6 on Wayland (Bazzite 44, Flatpak portal dialog): a plain folder chooser
appears; copying and moving several images into a chosen folder works.
SOFTWARE/OS VERSIONS
Gwenview: 26.04.3 (Flathub, runtime org.kde.Platform 6.10)
Operating System: Bazzite 44 (Fedora based)
KDE Plasma: 6 (Wayland)
--
You are receiving this mail because:
You are watching all bug changes.