Commit b3af5a41 authored by Maik Qualmann's avatar Maik Qualmann

the HEIF suffix is unknown in older Qt versions

parent 21c45639
Pipeline #26018 passed with stage
in 38 minutes and 17 seconds
......@@ -96,6 +96,8 @@ void FCTask::run()
if (d->settings.changeImageProperties &&
((suffix == QLatin1String("PGF")) ||
(suffix == QLatin1String("KRA")) ||
(suffix == QLatin1String("HEIC")) ||
(suffix == QLatin1String("HEIF")) ||
mimeName.startsWith(QLatin1String("image/"))))
{
ok = imageResize(d->srcUrl.toLocalFile(), dest.toLocalFile());
......
......@@ -403,16 +403,17 @@ void ShowFoto::slotDroppedUrls(const QList<QUrl>& droppedUrls, bool dropped)
if (drop.isValid())
{
QFileInfo info(drop.toLocalFile());
QString ext(info.suffix().toUpper());
QString suffix(info.suffix().toUpper());
QUrl url(QUrl::fromLocalFile(info.canonicalFilePath()));
// Add extra check of the image extensions that are still
// unknown in older Qt versions or have an application mime type.
if (QMimeDatabase().mimeTypeForUrl(url).name().startsWith(QLatin1String("image/")) ||
(ext == QLatin1String("HEIC")) ||
(ext == QLatin1String("HEIF")) ||
(ext == QLatin1String("KRA")))
(suffix == QLatin1String("PGF")) ||
(suffix == QLatin1String("KRA")) ||
(suffix == QLatin1String("HEIC")) ||
(suffix == QLatin1String("HEIF")))
{
imagesUrls << url;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment