Skip to content
Commit 6a79391a authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Prefer mime type from content over file name when loading

QMimeDatabase::mimeTypeForFileNameAndData() will prefer using the
filename for mime type determination. This allow it to be fooled when
the filename is something different than the contents. To avoid this,
reverse the logic and first try to determine the mimetype from the
file's contents and only use filename if that fails.

BUG: 329140
parent c84f6b2a
Loading
Loading
Loading
Loading
  • Please, revert this patch. It causes a serious regression in functionality (breaking RAW file viewing for perfectly well filenamed images) while the benefit is very dubious.

  • Nate Graham @ngraham

    mentioned in commit 1281004f

    ·

    mentioned in commit 1281004f

    Toggle commit list
  • Developer

    Done in 1281004f.

    Sorry for the breakage and the delay.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment