Bug 481082 - Incorrect KWin rule export dialog on KDE Plasma 6
Summary: Incorrect KWin rule export dialog on KDE Plasma 6
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_kwinrules (show other bugs)
Version: 5.93.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, regression, usability
Depends on:
Blocks:
 
Reported: 2024-02-08 20:39 UTC by Yevhen Popok
Modified: 2024-02-08 22:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments
Screencast demonstrating the issue (1.46 MB, video/webm)
2024-02-08 20:39 UTC, Yevhen Popok
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yevhen Popok 2024-02-08 20:39:42 UTC
Created attachment 165680 [details]
Screencast demonstrating the issue

SUMMARY
KWin on KDE Plasma 6 has a weird UX regression with rule export.
On KDE Plasma 5 in the "Export" dialog it was possible to save rule(s) to the new file that will be created automatically when user input name and press "Save". 
On KDE Plasma 6 in the "Export" dialog I need to overwrite existing file, otherwise there is an error.


STEPS TO REPRODUCE (there is also screencast in the attachment)
1. Go to "System Settings" > "Apps & Windows" > "Window Management"  > "Window Rules"
(alternatively, execute command "kcmshell6 kcm_kwinrules")
2. Create and "Apply"/Save some window rule
3. Navigate back to the "Window Rules" window
4. Press "Export" button, select rule that you would like to export
5. Press "Save Rules" button
6. In the Export dialog enter name of the saved .kwinrule file (e.g., "nice")
7. Press "Open" (the button name here is "Open", not "Save")

OBSERVED RESULT
Error dialog appears with title: "Cannot open file — System Settings" and description "The file "/home/user/nice" could not be  found"

EXPECTED RESULT
a new "nice.kwinrule" file is created

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Fedora Kinoite 40
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
I assume that kcm_kwinrules selects "FileDialog.OpenFile" even for the "Export" dialog.
Comment 1 Bug Janitor Service 2024-02-08 21:25:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5152
Comment 2 Ismael Asensio 2024-02-08 21:52:36 UTC
Git commit 7c8b5be55a7ab23ce1c0c052f8338b97b91b4921 by Ismael Asensio.
Committed on 08/02/2024 at 21:24.
Pushed by iasensio into branch 'master'.

kcms/rules: Fix import/export FileDialog type

They were just missing the alias qualifier.

Add also explicit parameters to the signal handlers.
FIXED-IN: 6.0

M  +1    -1    src/kcms/rules/ui/FileDialogLoader.qml
M  +2    -2    src/kcms/rules/ui/main.qml

https://invent.kde.org/plasma/kwin/-/commit/7c8b5be55a7ab23ce1c0c052f8338b97b91b4921
Comment 3 Ismael Asensio 2024-02-08 22:05:49 UTC
Git commit 2d099d66033c897f9ae533a2f55ae9a7a8f91d09 by Ismael Asensio.
Committed on 08/02/2024 at 21:57.
Pushed by iasensio into branch 'Plasma/6.0'.

kcms/rules: Fix import/export FileDialog type

They were just missing the alias qualifier.

Add also explicit parameters to the signal handlers.
FIXED-IN: 6.0


(cherry picked from commit 7c8b5be55a7ab23ce1c0c052f8338b97b91b4921)

M  +1    -1    src/kcms/rules/ui/FileDialogLoader.qml
M  +2    -2    src/kcms/rules/ui/main.qml

https://invent.kde.org/plasma/kwin/-/commit/2d099d66033c897f9ae533a2f55ae9a7a8f91d09