Bug 393170 - "Saving failed" warning has raw html in it
Summary: "Saving failed" warning has raw html in it
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 17.12.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 393713 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-15 17:11 UTC by Luca Weiss
Modified: 2018-05-01 07:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 18.04.1


Attachments
Screenshot of the bug (79.90 KB, image/png)
2018-04-15 17:11 UTC, Luca Weiss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Weiss 2018-04-15 17:11:24 UTC
Created attachment 112049 [details]
Screenshot of the bug

When saving of a file fails, you get two dialogs. One error dialog with e.g. "Could not open file for writing, check that you have the necessary rights in file:///tmp/." and another one (warning dialog) with e.g. "Saving IMG_20180410_094505.jpg failed:" and the html code from the error dialog in raw form (so the <html> and <tt> tags are visible.

This is also a UX problem as you get two dialogs that basically say the same thing.
Comment 1 Peter Mühlenpfordt 2018-04-17 08:59:21 UTC
I can confirm both issues. They still exist in current master.
The duplicate message box is caused by KJob's (not disabled) internal error handling.
Gwenview's error dialog adds KJobs already html-formatted error string to the message which results in displaying the markup.
Comment 2 Peter Mühlenpfordt 2018-04-19 09:40:39 UTC
Git commit 5e7fe7535f9d5fb2de44fe408fe8cf5b0f7937b1 by Peter Mühlenpfordt.
Committed on 19/04/2018 at 09:37.
Pushed by muhlenpfordt into branch 'Applications/18.04'.

Fix duplicate and markup displaying failed-save message box

Summary:
When saving of a file fails, two dialogs are displayed. One of them
contains markup tags like `<html>` and `<tt>`.
The duplicate message box is caused by KJob's (not disabled) internal
error handling. The markup is displayed because of using strings with
markup as argument for `xi18n*` functions without special handling.
FIXED-IN: 18.04.1

Test Plan:
1. Open Gwenview in View or Browse Mode
2. {nav File > Save As} or {key Ctrl Shift S}
3. Try to save in a folder you don't have write permission (e.g. Root)
4. Error message box should display only once and without markup tags

1. Open Gwenview in View or Browse Mode
2. Edit a readonly file (e.g. rotate with {key Ctrl R})
3. Click {nav Save} or {nav Save All}
4. Error message box should display only once and without markup tags

Reviewers: #gwenview, rkflx

Reviewed By: #gwenview, rkflx

Subscribers: rkflx

Differential Revision: https://phabricator.kde.org/D12302

M  +1    -1    app/gvcore.cpp
M  +1    -1    app/saveallhelper.cpp
M  +5    -2    lib/document/savejob.cpp

https://commits.kde.org/gwenview/5e7fe7535f9d5fb2de44fe408fe8cf5b0f7937b1
Comment 3 null 2018-05-01 07:42:31 UTC
*** Bug 393713 has been marked as a duplicate of this bug. ***