Skip to content

Commit

Permalink
Bug 766069 - Files with incorrect extensions (.doc) are picked up by …
Browse files Browse the repository at this point in the history
…doxygen
  • Loading branch information
Dimitri van Heesch committed May 16, 2016
1 parent 2f8c5b9 commit 14b04be
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 29 deletions.
2 changes: 0 additions & 2 deletions src/config.xml
Expand Up @@ -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>
Expand Down
5 changes: 3 additions & 2 deletions src/configimpl.h
Expand Up @@ -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;
};

Expand Down
31 changes: 10 additions & 21 deletions src/configimpl.l
Expand Up @@ -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()
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 1 addition & 3 deletions src/util.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down
1 change: 0 additions & 1 deletion src/util.h
Expand Up @@ -474,7 +474,6 @@ void convertProtectionLevel(
);

bool mainPageHasTitle();
const QDict<int> &getExtensionLookup();
bool openOutputFile(const char *outFile,QFile &f);

#endif
Expand Down

0 comments on commit 14b04be

Please sign in to comment.