Skip to content

Optimize mime type matching

Don't count "*", don't search for "[" and for "?" inside m_pattern on every call to matchFileName(). Do it once, when constructing the MimeGlobPattern.

Fix matching the pattern for names without any wildcard: index of question mark should be -1, not just different from 0.

This shortens loading a Qt6 project in Creator by about 500 ms.

Change-Id: Ifa40c2cec4aba07a0312ef36877e571a8c8fb151 Reviewed-by: Qt CI Bot Reviewed-by: David Faure Reviewed-by: Jarek Kobus (cherry picked from commit 3c747aaf)

Merge request reports