summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2015-08-16 16:19:27 (GMT)
committeralbert-github <albert.tests@gmail.com>2015-08-16 16:19:27 (GMT)
commitbf35f16863f067286260ad4b68ec4c0ae7febdf1 (patch)
tree89b43be7631b55291f677c9e3ddcb91319262526 /src/util.cpp
parent625e7a17bc708a32d52158ac24e7308c9d62fe84 (diff)
downloadDoxygen-bf35f16863f067286260ad4b68ec4c0ae7febdf1.zip
Doxygen-bf35f16863f067286260ad4b68ec4c0ae7febdf1.tar.gz
Doxygen-bf35f16863f067286260ad4b68ec4c0ae7febdf1.tar.bz2
Make list of default extensions consistent with language mapping list
In the forum a discrepancy was noted between config.l and config.xml (http://doxygen.10944.n7.nabble.com/FILE-PATTERNS-one-custom-plus-all-defaults-td7308.html). The config.xml list was based on the function initDefaultExtensionMapping in util.cpp and the list in the function Config::check in config.l. Now both routines use the same list.
Diffstat (limited to 'src/util.cpp')
-rwxr-xr-x[-rw-r--r--]src/util.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index db6a19c..db1030c 100644..100755
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6854,6 +6854,7 @@ bool updateLanguageMapping(const QCString &extension,const QCString &language)
void initDefaultExtensionMapping()
{
+ // NOTE: when adding an extension, also add the extension in config.xml
g_extLookup.setAutoDelete(TRUE);
// extension parser id
updateLanguageMapping(".dox", "c");
@@ -8419,3 +8420,23 @@ QCString getDotImageExtension(void)
imgExt = imgExt.replace( QRegExp(":.*"), "" );
return imgExt;
}
+
+
+void initFilePattern(void)
+{
+ // add default pattern if needed
+ QStrList &filePatternList = Config_getList("FILE_PATTERNS");
+ if (filePatternList.isEmpty())
+ {
+ QDictIterator<int> it( g_extLookup );
+ QCString pattern;
+ bool caseSens = portable_fileSystemIsCaseSensitive();
+ for (;it.current();++it)
+ {
+ pattern = "*";
+ pattern += it.currentKey();
+ filePatternList.append(pattern.data());
+ if (caseSens) filePatternList.append(pattern.upper().data());
+ }
+ }
+}