diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2018-09-15 15:12:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-15 15:12:08 (GMT) |
commit | 6c1c88f41aa68e6999bfa4b72e37c5a8034588a5 (patch) | |
tree | c7e362d4241f6f4e30b0f85afa08b31506bd12a5 /src/configimpl.l | |
parent | 7a24844b214005b4a12005c4d3e3c2c998dd8ae5 (diff) | |
parent | ed1fb80b55bab16443b211ebeb1cd45bb630b08b (diff) | |
download | Doxygen-6c1c88f41aa68e6999bfa4b72e37c5a8034588a5.zip Doxygen-6c1c88f41aa68e6999bfa4b72e37c5a8034588a5.tar.gz Doxygen-6c1c88f41aa68e6999bfa4b72e37c5a8034588a5.tar.bz2 |
Merge pull request #6510 from albert-github/feature/doxyfile_differnces
Difference between standard and used Doxyfile
Diffstat (limited to 'src/configimpl.l')
-rw-r--r-- | src/configimpl.l | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/configimpl.l b/src/configimpl.l index df032a6..72584d7 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -315,6 +315,28 @@ void ConfigList::writeTemplate(FTextStream &t,bool sl,bool) t << "\n"; } +void ConfigList::compareDoxyfile(FTextStream &t) +{ + if ( m_value.count() != m_defaultValue.count()) + { + writeTemplate(t,TRUE,TRUE); + return; + } + + const char *p = m_value.first(); + const char *q = m_defaultValue.first(); + while (p) + { + p = m_value.next(); + q = m_defaultValue.next(); + if (QCString(p).stripWhiteSpace() != QCString(q).stripWhiteSpace()) + { + writeTemplate(t,TRUE,TRUE); + return; + } + } +} + void ConfigEnum::writeTemplate(FTextStream &t,bool sl,bool) { if (!sl) @@ -332,6 +354,11 @@ void ConfigEnum::writeTemplate(FTextStream &t,bool sl,bool) t << "\n"; } +void ConfigEnum::compareDoxyfile(FTextStream &t) +{ + if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE); +} + void ConfigString::writeTemplate(FTextStream &t,bool sl,bool) { if (!sl) @@ -349,6 +376,11 @@ void ConfigString::writeTemplate(FTextStream &t,bool sl,bool) t << "\n"; } +void ConfigString::compareDoxyfile(FTextStream &t) +{ + if (m_value.stripWhiteSpace() != m_defValue.stripWhiteSpace()) writeTemplate(t,TRUE,TRUE); +} + void ConfigInt::writeTemplate(FTextStream &t,bool sl,bool upd) { if (!sl) @@ -373,6 +405,11 @@ void ConfigInt::writeTemplate(FTextStream &t,bool sl,bool upd) t << "\n"; } +void ConfigInt::compareDoxyfile(FTextStream &t) +{ + if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE); +} + void ConfigBool::writeTemplate(FTextStream &t,bool sl,bool upd) { if (!sl) @@ -397,6 +434,11 @@ void ConfigBool::writeTemplate(FTextStream &t,bool sl,bool upd) t << "\n"; } +void ConfigBool::compareDoxyfile(FTextStream &t) +{ + if (m_value != m_defValue) writeTemplate(t,TRUE,TRUE); +} + void ConfigObsolete::writeTemplate(FTextStream &,bool,bool) {} void ConfigDisabled::writeTemplate(FTextStream &,bool,bool) {} @@ -871,6 +913,18 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd) } } +void ConfigImpl::compareDoxyfile(FTextStream &t) +{ + t << "# Difference with default Doxyfile " << versionString << endl; + QListIterator<ConfigOption> it = iterator(); + ConfigOption *option; + for (;(option=it.current());++it) + { + option->m_userComment = ""; + option->compareDoxyfile(t); + } +} + void ConfigImpl::convertStrToVal() { QListIterator<ConfigOption> it = iterator(); @@ -1749,6 +1803,12 @@ void Config::writeTemplate(FTextStream &t,bool shortList,bool update) ConfigImpl::instance()->writeTemplate(t,shortList,update); } +void Config::compareDoxyfile(FTextStream &t) +{ + postProcess(FALSE); + ConfigImpl::instance()->compareDoxyfile(t); +} + bool Config::parse(const char *fileName,bool update) { return ConfigImpl::instance()->parse(fileName,update); |