summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2017-12-24 09:50:53 (GMT)
committerGitHub <noreply@github.com>2017-12-24 09:50:53 (GMT)
commitbffef5bbfcd1570a0d5256f518395af812218404 (patch)
treec330a6d4ca40ac4194b30e30ef3f78350a7dc7da /src
parentdc11a3f6a207b3539ffe55a20164d4a90961ff30 (diff)
parentbd759f9a3aa4096bc8574ea45ad6b23fed830742 (diff)
downloadDoxygen-bffef5bbfcd1570a0d5256f518395af812218404.zip
Doxygen-bffef5bbfcd1570a0d5256f518395af812218404.tar.gz
Doxygen-bffef5bbfcd1570a0d5256f518395af812218404.tar.bz2
Merge pull request #631 from ksztyber/excl_patter_ci
Allow case insensitive file pattern matching based on CASE_SENSE_NAMES
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 438efc9..7a4bd65 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -7902,9 +7902,16 @@ QCString filterTitle(const QCString &title)
bool patternMatch(const QFileInfo &fi,const QStrList *patList)
{
- bool found=FALSE;
+ static bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES);
+ bool found = FALSE;
+
+ // For Windows/Mac, always do the case insensitive match
+#if defined(_WIN32) || defined(__MACOSX__)
+ caseSenseNames = FALSE;
+#endif
+
if (patList)
- {
+ {
QStrListIterator it(*patList);
QCString pattern;
@@ -7919,11 +7926,8 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList)
int i=pattern.find('=');
if (i!=-1) pattern=pattern.left(i); // strip of the extension specific filter name
-#if defined(_WIN32) || defined(__MACOSX__) // Windows or MacOSX
- QRegExp re(pattern,FALSE,TRUE); // case insensitive match
-#else // unix
- QRegExp re(pattern,TRUE,TRUE); // case sensitive match
-#endif
+ QRegExp re(pattern,caseSenseNames,TRUE);
+
found = re.match(fn)!=-1 ||
re.match(fp)!=-1 ||
re.match(afp)!=-1;