From 34796ce8ed2dcb3239a5fc33c421788b1c1a6d98 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Fri, 15 Jul 2022 19:51:12 +0800 Subject: [PATCH] opt: extension check ignore case --- utils.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.hh b/utils.hh index b71f7527..a30a144c 100644 --- a/utils.hh +++ b/utils.hh @@ -88,7 +88,7 @@ inline bool isHtmlResources(QUrl const &url) { auto fileName = url.fileName(); auto ext=fileName.mid(fileName.lastIndexOf(".")); QStringList extensions{".css",".woff",".woff2","ttf",".bmp" ,".jpg", ".png",".gif", ".tif",".wav", ".ogg", ".oga", ".mp3", ".mp4", ".aac", ".flac",".mid", ".wv",".ape"} ; - return extensions.indexOf(ext)>-1; + return extensions.contains( ext, Qt::CaseInsensitive ); } inline QString escape( QString const & plain )