Bug 407165 - Image dragged-and-dropped from main UI is always a png; does not respect default file type
Summary: Image dragged-and-dropped from main UI is always a png; does not respect defa...
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-02 19:39 UTC by Nate Graham
Modified: 2019-05-05 18:52 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-05-02 19:39:15 UTC
STEPS TO REPRODUCE
1. Go to Spectacle's settings and change the save format to jpeg
2. Take a new screenshot
3. Drag-and-drop the screenshot from the main window to somewhere else


OBSERVED RESULT
The image in the destination location is a png, not a jpeg


EXPECTED RESULT
The image in the destination location is a jpeg


VERSION
Spectacle 19.04.0
Comment 1 Nate Graham 2019-05-02 21:39:18 UTC
Patch: https://phabricator.kde.org/D20976
Comment 2 Nate Graham 2019-05-05 18:52:37 UTC
Git commit 32058e28dda5fd06774666b3b8e4cfb7e57af689 by Nate Graham.
Committed on 05/05/2019 at 18:52.
Pushed by ngraham into branch 'Applications/19.04'.

Respect the user-configured mimetype when dragging an image from the main window

Summary:
Currently, `ExportManager::tempSave()` expects a mimetype argument but defaults to PNG.
However no users of that function actually pass it a mimetype, so drag-and-dropped files
always get the PNG file format, even if the user changed the default file format in the
settings window.

This patch changes the function to do away with the optional mimetype argument and
instead always use the mimetype that the user has specified in the settings window.
FIXED-IN: 19.04.1

Test Plan:
- Set the file format to JPEG
- Take a new screenshot
- Drag the image from the main window to somewhere else. It is created as a JPEG file.

Reviewers: #spectacle, #kde_applications, davidre, nrother, #vdg, filipf

Reviewed By: #vdg, filipf

Subscribers: filipf

Tags: #spectacle

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

M  +3    -1    src/ExportManager.cpp
M  +1    -1    src/ExportManager.h

https://commits.kde.org/spectacle/32058e28dda5fd06774666b3b8e4cfb7e57af689