mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-03-28 08:58:26 -04:00
Detect image format solely on content.
Otherwise reading fails if the file extension is wrong. Closes #512
This commit is contained in:
parent
6e2de1cd79
commit
57ec558396
@ -131,6 +131,8 @@ void EditWidgetIcons::addCustomIcon()
|
||||
this, tr("Select Image"), "", filter);
|
||||
if (!filename.isEmpty()) {
|
||||
QImageReader imageReader(filename);
|
||||
// detect from content, otherwise reading fails if file extension is wrong
|
||||
imageReader.setDecideFormatFromContent(true);
|
||||
QImage image = imageReader.read();
|
||||
if (!image.isNull()) {
|
||||
Uuid uuid = Uuid::random();
|
||||
|
Loading…
x
Reference in New Issue
Block a user