summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.xml2
-rw-r--r--src/configimpl.h5
-rw-r--r--src/configimpl.l31
-rwxr-xr-xsrc/util.cpp4
-rwxr-xr-xsrc/util.h1
5 files changed, 14 insertions, 29 deletions
diff --git a/src/config.xml b/src/config.xml
index 69b13ec..abed704 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -1344,8 +1344,6 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
<value name='*.vhdl'/>
<value name='*.ucf'/>
<value name='*.qsf'/>
- <value name='*.as'/>
- <value name='*.js'/>
</option>
<option type='bool' id='RECURSIVE' defval='0'>
<docs>
diff --git a/src/configimpl.h b/src/configimpl.h
index 4dd96be..c901198 100644
--- a/src/configimpl.h
+++ b/src/configimpl.h
@@ -119,15 +119,16 @@ class ConfigList : public ConfigOption
m_doc = doc;
m_widgetType = String;
}
- void addValue(const char *v) { m_value.append(v); }
+ void addValue(const char *v) { m_defaultValue.append(v); }
void setWidgetType(WidgetType w) { m_widgetType = w; }
WidgetType widgetType() const { return m_widgetType; }
QStrList *valueRef() { return &m_value; }
void writeTemplate(FTextStream &t,bool sl,bool);
void substEnvVars();
- void init() { m_value.clear(); }
+ void init() { m_value = m_defaultValue; }
private:
QStrList m_value;
+ QStrList m_defaultValue;
WidgetType m_widgetType;
};
diff --git a/src/configimpl.l b/src/configimpl.l
index ac046a8..2cf698a 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -1193,26 +1193,6 @@ static void checkFileName(QCString &s,const char *optionName)
}
}
-static void initFilePattern(void)
-{
- // add default pattern if needed
- QStrList &filePatternList = ConfigImpl_getList("FILE_PATTERNS");
- if (filePatternList.isEmpty())
- {
- QDictIterator<int> it( getExtensionLookup() );
- 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());
- }
- }
-}
-
-
#include "config.h"
void Config::init()
@@ -1571,7 +1551,16 @@ void Config::checkAndCorrect()
}
}
- initFilePattern();
+ // add default file patterns if needed
+ QStrList &filePatternList = ConfigImpl_getList("FILE_PATTERNS");
+ if (filePatternList.isEmpty())
+ {
+ ConfigOption * opt = ConfigImpl::instance()->get("FILE_PATTERNS");
+ if (opt->kind()==ConfigOption::O_List)
+ {
+ ((ConfigList*)opt)->init();
+ }
+ }
// add default pattern if needed
QStrList &examplePatternList = ConfigImpl_getList("EXAMPLE_PATTERNS");
diff --git a/src/util.cpp b/src/util.cpp
index 7624ab9..592398d 100755
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -7020,8 +7020,6 @@ void stringToSearchIndex(const QCString &docBaseUrl,const QCString &title,
static QDict<int> g_extLookup;
-const QDict<int> &getExtensionLookup() { return g_extLookup; }
-
static struct Lang2ExtMap
{
const char *langName;
@@ -7092,7 +7090,7 @@ void initDefaultExtensionMapping()
g_extLookup.setAutoDelete(TRUE);
// extension parser id
updateLanguageMapping(".dox", "c");
- //updateLanguageMapping(".txt", "c"); // see bug 760836
+ updateLanguageMapping(".txt", "c"); // see bug 760836
updateLanguageMapping(".doc", "c");
updateLanguageMapping(".c", "c");
updateLanguageMapping(".C", "c");
diff --git a/src/util.h b/src/util.h
index 61d4e1d..777da71 100755
--- a/src/util.h
+++ b/src/util.h
@@ -474,7 +474,6 @@ void convertProtectionLevel(
);
bool mainPageHasTitle();
-const QDict<int> &getExtensionLookup();
bool openOutputFile(const char *outFile,QFile &f);
#endif