diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-02-28 21:22:17 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-02-28 21:22:17 (GMT) |
commit | 8eeaae0b06fd320745f22efe176e0f19d6c8e2a6 (patch) | |
tree | d696e3714dfa9c03f9171dce12da65a51ea84d39 /src | |
parent | de1a8b9a7213ff5c7ebe0742976e9848c2eee9a8 (diff) | |
parent | 8991d11cc824f40c11a28ccc38c09e9b10f722c3 (diff) | |
download | Doxygen-8eeaae0b06fd320745f22efe176e0f19d6c8e2a6.zip Doxygen-8eeaae0b06fd320745f22efe176e0f19d6c8e2a6.tar.gz Doxygen-8eeaae0b06fd320745f22efe176e0f19d6c8e2a6.tar.bz2 |
Merge pull request #129 from groleo/master
util/patternMatch: don't extract a QCString(QFileInfo) each time we QReg...
Diffstat (limited to 'src')
-rw-r--r-- | src/util.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp index 55b5d1e..bc93446 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7443,6 +7443,11 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList) { QStrListIterator it(*patList); QCString pattern; + + QCString fn = fi.fileName().data(); + QCString fp = fi.filePath().data(); + QCString afp= fi.absFilePath().data(); + for (it.toFirst();(pattern=it.current());++it) { if (!pattern.isEmpty()) @@ -7455,9 +7460,9 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList) #else // unix QRegExp re(pattern,TRUE,TRUE); // case sensitive match #endif - found = found || re.match(fi.fileName().data())!=-1 || - re.match(fi.filePath().data())!=-1 || - re.match(fi.absFilePath().data())!=-1; + found = re.match(fn)!=-1 || + re.match(fp)!=-1 || + re.match(afp)!=-1; if (found) break; //printf("Matching `%s' against pattern `%s' found=%d\n", // fi->fileName().data(),pattern.data(),found); |