• Arjen Hiemstra's avatar
    Prefer mime type from content over file name when loading · 6a79391a
    Arjen Hiemstra authored
    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
loadingdocumentimpl.cpp 17.5 KB