Bug 417382 - gwenview shows two warnings at the same time if I try to save a file with an invalid extension
Summary: gwenview shows two warnings at the same time if I try to save a file with an ...
Status: CONFIRMED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 20.08.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 421150 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-10 13:26 UTC by Patrick Silva
Modified: 2021-06-12 16:03 UTC (History)
3 users (show)

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


Attachments
screenshot (178.56 KB, image/png)
2020-02-10 13:27 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-02-10 13:26:17 UTC
SUMMARY


STEPS TO REPRODUCE
1. open an image with gwenview
2. crop such image
3. click on "Save as" button on top
4. type a file name with an invalid extension like "image.aaa" and press enter/return

OBSERVED RESULT
As we can see in the attached screenshot, gwenview shows two warnings at the same time.

EXPECTED RESULT
gwenview should only show the warning with "Save as..." and "Cancel" buttons

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.68.0
Qt Version: 5.13.2
Comment 1 Patrick Silva 2020-02-10 13:27:16 UTC
Created attachment 125821 [details]
screenshot
Comment 2 Antonio Prcela 2020-11-26 20:58:43 UTC
Happens because we get both:

https://invent.kde.org/graphics/gwenview/-/blob/master/lib/document/savejob.cpp#L75
and
https://invent.kde.org/graphics/gwenview/-/blob/master/app/gvcore.cpp#L451

when an save error occurs.
The first one gives the error message, the second one the more detailed warning with the possibility to "save as" again.

Tried some approaches, but can't remove the error message. Since the second one is more detailed, I'd rather keep that one.
Thoughts?
Comment 3 Patrick Silva 2021-05-16 16:22:16 UTC
STEPS TO REPRODUCE with current Gwenview master:

1. open an image with gwenview
2. open File menu and choose "Save as" (or press ctrl+shift+s)
3. Uncheck "Automatically select filename extension" on bottom
4. type a file name with an invalid extension like "image.aaa" and press enter/return

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 4 Patrick Silva 2021-06-12 16:03:25 UTC
*** Bug 421150 has been marked as a duplicate of this bug. ***