fix: supported image formats are case sensitive

check for the (supported) extension in case insensitive manner

Fixes #12835
This commit is contained in:
Lukáš Tinkl 2023-11-23 17:16:03 +01:00 committed by Lukáš Tinkl
parent db8cb6c74c
commit 88d0c2493e
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ bool QClipboardProxy::isValidImageUrl(const QUrl& url, const QStringList& accept
{
const auto strippedUrl = url.url(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery);
return std::any_of(acceptedExtensions.constBegin(), acceptedExtensions.constEnd(), [strippedUrl](const auto & ext) {
return strippedUrl.endsWith(ext);
return strippedUrl.endsWith(ext, Qt::CaseInsensitive);
});
}