fix: supported image formats are case sensitive
check for the (supported) extension in case insensitive manner Fixes #12835
This commit is contained in:
parent
db8cb6c74c
commit
88d0c2493e
|
@ -76,7 +76,7 @@ bool QClipboardProxy::isValidImageUrl(const QUrl& url, const QStringList& accept
|
||||||
{
|
{
|
||||||
const auto strippedUrl = url.url(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery);
|
const auto strippedUrl = url.url(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery);
|
||||||
return std::any_of(acceptedExtensions.constBegin(), acceptedExtensions.constEnd(), [strippedUrl](const auto & ext) {
|
return std::any_of(acceptedExtensions.constBegin(), acceptedExtensions.constEnd(), [strippedUrl](const auto & ext) {
|
||||||
return strippedUrl.endsWith(ext);
|
return strippedUrl.endsWith(ext, Qt::CaseInsensitive);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue