summaryrefslogtreecommitdiffstats
path: root/addon/doxywizard/expert.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-10-06 17:49:59 (GMT)
committerGitHub <noreply@github.com>2020-10-06 17:49:59 (GMT)
commit419338985d709af04589450d0754757de7d0a9d6 (patch)
tree4248f8668b3b118e1823e6e790c4406ab96247dd /addon/doxywizard/expert.cpp
parent4fec3a94bb36d09deca5f4762ba8e60d0e28f8d3 (diff)
parent9f68f7f9932b349d65b6af6059807af55d2e535a (diff)
downloadDoxygen-419338985d709af04589450d0754757de7d0a9d6.zip
Doxygen-419338985d709af04589450d0754757de7d0a9d6.tar.gz
Doxygen-419338985d709af04589450d0754757de7d0a9d6.tar.bz2
Merge pull request #8076 from albert-github/feature/bug_doxyw_cond
Create possibility to show in doxywizard "condensed" settings
Diffstat (limited to 'addon/doxywizard/expert.cpp')
-rw-r--r--addon/doxywizard/expert.cpp32
1 files changed, 20 insertions, 12 deletions
diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp
index f088199..170959f 100644
--- a/addon/doxywizard/expert.cpp
+++ b/addon/doxywizard/expert.cpp
@@ -756,15 +756,18 @@ void Expert::loadConfig(const QString &fileName)
}
void Expert::saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,
- bool brief)
+ bool brief,bool condensed)
{
if (!brief)
{
t << endl;
}
- t << "#---------------------------------------------------------------------------" << endl;
- t << "# " << elem.attribute(SA("docs")) << endl;
- t << "#---------------------------------------------------------------------------" << endl;
+ if (!condensed)
+ {
+ t << "#---------------------------------------------------------------------------" << endl;
+ t << "# " << elem.attribute(SA("docs")) << endl;
+ t << "#---------------------------------------------------------------------------" << endl;
+ }
// write options...
QDomElement childElem = elem.firstChildElement();
while (!childElem.isNull())
@@ -784,24 +787,29 @@ void Expert::saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,
t << convertToComment(option->templateDocs());
t << endl;
}
- t << name.leftJustified(MAX_OPTION_LENGTH) << "=";
- if (option && !option->isEmpty())
+ bool toPrint = true;
+ if (option && condensed) toPrint = !option->isDefault();
+ if (toPrint)
{
- t << " ";
- option->writeValue(t,codec);
+ t << name.leftJustified(MAX_OPTION_LENGTH) << "=";
+ if (option && !option->isEmpty())
+ {
+ t << " ";
+ option->writeValue(t,codec);
+ }
+ t << endl;
}
- t << endl;
}
}
childElem = childElem.nextSiblingElement();
}
}
-bool Expert::writeConfig(QTextStream &t,bool brief)
+bool Expert::writeConfig(QTextStream &t,bool brief, bool condensed)
{
// write global header
t << "# Doxyfile " << getDoxygenVersion() << endl << endl;
- if (!brief)
+ if (!brief && !condensed)
{
t << convertToComment(m_header);
}
@@ -821,7 +829,7 @@ bool Expert::writeConfig(QTextStream &t,bool brief)
{
if (childElem.tagName()==SA("group"))
{
- saveTopic(t,childElem,codec,brief);
+ saveTopic(t,childElem,codec,brief,condensed);
}
childElem = childElem.nextSiblingElement();
}