summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-03-17 19:29:45 (GMT)
committerGitHub <noreply@github.com>2020-03-17 19:29:45 (GMT)
commit39ba759f4dba837818f07451314b3612d438a1bd (patch)
tree6d10f007a4107613446f308e7bf2107144e5b11b
parent0f9075aefb620bbef4609111289ff6255ac15cd3 (diff)
downloadDoxygen-39ba759f4dba837818f07451314b3612d438a1bd.zip
Doxygen-39ba759f4dba837818f07451314b3612d438a1bd.tar.gz
Doxygen-39ba759f4dba837818f07451314b3612d438a1bd.tar.bz2
Doxygen version information (#7645)
- add doxygen version to rtf, comment, output - remove duplicate code (getFullVersion) - more clear name to get doxygen version (getVersion becomes getrDoxygenVersion). Also to overcomecofusion with the version information for files.
-rw-r--r--addon/doxyparse/doxyparse.cpp2
-rwxr-xr-xaddon/doxywizard/doxywizard.cpp2
-rw-r--r--addon/doxywizard/expert.cpp2
-rw-r--r--libversion/doxyversion.cpp.in2
-rw-r--r--libversion/version.h2
-rw-r--r--src/configimpl.l8
-rw-r--r--src/context.cpp2
-rw-r--r--src/doxygen.cpp20
-rw-r--r--src/htmlgen.cpp18
-rw-r--r--src/latexgen.cpp8
-rw-r--r--src/layout.cpp2
-rw-r--r--src/resourcemgr.cpp2
-rw-r--r--src/rtfgen.cpp6
-rw-r--r--src/searchindex.cpp2
-rw-r--r--src/util.cpp16
-rw-r--r--src/util.h1
-rw-r--r--src/xmlgen.cpp4
17 files changed, 47 insertions, 52 deletions
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 78a91d3..24769e0 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -434,7 +434,7 @@ int main(int argc,char **argv) {
exit(1);
}
if (qstrcmp(&argv[1][2], "version") == 0) {
- QCString versionString = getVersion();
+ QCString versionString = getDoxygenVersion();
printf("%s\n", versionString.data());
exit(0);
}
diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp
index dc0a6dc..d0811d4 100755
--- a/addon/doxywizard/doxywizard.cpp
+++ b/addon/doxywizard/doxywizard.cpp
@@ -228,7 +228,7 @@ void MainWindow::about()
QString msg;
QTextStream t(&msg,QIODevice::WriteOnly);
t << QString::fromLatin1("<qt><center>A tool to configure and run doxygen version ")+
- QString::fromLatin1(getVersion())+
+ QString::fromLatin1(getDoxygenVersion())+
QString::fromLatin1(" on your source files.</center><p><br>"
"<center>Written by<br> Dimitri van Heesch<br>&copy; 2000-2019</center><p>"
"</qt>");
diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp
index 1303a22..c043994 100644
--- a/addon/doxywizard/expert.cpp
+++ b/addon/doxywizard/expert.cpp
@@ -796,7 +796,7 @@ void Expert::saveTopic(QTextStream &t,QDomElement &elem,QTextCodec *codec,
bool Expert::writeConfig(QTextStream &t,bool brief)
{
// write global header
- t << "# Doxyfile " << getVersion() << endl << endl;
+ t << "# Doxyfile " << getDoxygenVersion() << endl << endl;
if (!brief)
{
t << convertToComment(m_header);
diff --git a/libversion/doxyversion.cpp.in b/libversion/doxyversion.cpp.in
index 11bca8d..614aa07 100644
--- a/libversion/doxyversion.cpp.in
+++ b/libversion/doxyversion.cpp.in
@@ -1,6 +1,6 @@
#include "version.h"
-char *getVersion(void)
+char *getDoxygenVersion(void)
{
static char versionString[] = "@DOXYGEN_VERSION@";
return versionString;
diff --git a/libversion/version.h b/libversion/version.h
index a656e74..22a054d 100644
--- a/libversion/version.h
+++ b/libversion/version.h
@@ -17,6 +17,6 @@
#ifndef VERSION_H
#define VERSION_H
-char *getVersion(void);
+char *getDoxygenVersion(void);
char *getGitVersion(void);
#endif
diff --git a/src/configimpl.l b/src/configimpl.l
index 1490912..055304d 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -1001,7 +1001,7 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd)
{
t << takeStartComment() << endl;
}
- t << "# Doxyfile " << getVersion() << endl << endl;
+ t << "# Doxyfile " << getDoxygenVersion() << endl << endl;
if (!sl)
{
t << convertToComment(m_header,"");
@@ -1022,11 +1022,7 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd)
void ConfigImpl::compareDoxyfile(FTextStream &t)
{
- t << "# Difference with default Doxyfile " << getVersion();
- if (strlen(getGitVersion()))
- {
- t << " (" << getGitVersion() << ")";
- }
+ t << "# Difference with default Doxyfile " << getFullVersion();
t << endl;
QListIterator<ConfigOption> it = iterator();
ConfigOption *option;
diff --git a/src/context.cpp b/src/context.cpp
index d4e2799..1536715 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -380,7 +380,7 @@ class DoxygenContext::Private
public:
TemplateVariant version() const
{
- return getVersion();
+ return getDoxygenVersion();
}
TemplateVariant date() const
{
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 56fac35..c269067 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -9949,15 +9949,7 @@ static int computeIdealCacheParam(uint v)
void readConfiguration(int argc, char **argv)
{
- QCString versionString;
- if (strlen(getGitVersion())>0)
- {
- versionString = QCString(getVersion())+" ("+getGitVersion()+")";
- }
- else
- {
- versionString = getVersion();
- }
+ QCString versionString = getFullVersion();
/**************************************************************************
* Handle arguments *
@@ -10774,15 +10766,7 @@ void parseInput()
// we would like to show the versionString earlier, but we first have to handle the configuration file
// to know the value of the QUIET setting.
- QCString versionString;
- if (strlen(getGitVersion())>0)
- {
- versionString = QCString(getVersion())+" ("+getGitVersion()+")";
- }
- else
- {
- versionString = getVersion();
- }
+ QCString versionString = getFullVersion();
msg("Doxygen version used: %s\n",versionString.data());
/**************************************************************************
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 0e3b146..ac42a6a 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1070,7 +1070,7 @@ void HtmlGenerator::writeSearchData(const char *dir)
{
searchCss = mgr.getAsString("search.css");
}
- searchCss = substitute(replaceColorMarkers(searchCss),"$doxygenversion",getVersion());
+ searchCss = substitute(replaceColorMarkers(searchCss),"$doxygenversion",getDoxygenVersion());
t << searchCss;
Doxygen::indexList->addStyleSheetFile("search/search.css");
}
@@ -1079,20 +1079,20 @@ void HtmlGenerator::writeSearchData(const char *dir)
void HtmlGenerator::writeStyleSheetFile(QFile &file)
{
FTextStream t(&file);
- t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getVersion()));
+ t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getDoxygenVersion()));
}
void HtmlGenerator::writeHeaderFile(QFile &file, const char * /*cssname*/)
{
FTextStream t(&file);
- t << "<!-- HTML header for doxygen " << getVersion() << "-->" << endl;
+ t << "<!-- HTML header for doxygen " << getDoxygenVersion() << "-->" << endl;
t << ResourceMgr::instance().getAsString("header.html");
}
void HtmlGenerator::writeFooterFile(QFile &file)
{
FTextStream t(&file);
- t << "<!-- HTML footer for doxygen " << getVersion() << "-->" << endl;
+ t << "<!-- HTML footer for doxygen " << getDoxygenVersion() << "-->" << endl;
t << ResourceMgr::instance().getAsString("footer.html");
}
@@ -1113,7 +1113,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
t << substituteHtmlKeywords(g_header,convertToHtml(filterTitle(title)),m_relPath);
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << getVersion() << " -->" << endl;
+ << getDoxygenVersion() << " -->" << endl;
//static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW);
static bool searchEngine = Config_getBool(SEARCHENGINE);
if (searchEngine /*&& !generateTreeView*/)
@@ -1177,7 +1177,7 @@ QCString HtmlGenerator::writeLogoAsString(const char *path)
"<img class=\"footer\" src=\"";
result += path;
result += "doxygen.png\" alt=\"doxygen\"/></a> ";
- result += getVersion();
+ result += getDoxygenVersion();
result += " ";
return result;
}
@@ -1230,7 +1230,7 @@ void HtmlGenerator::writeStyleInfo(int part)
//t << "H1 { text-align: center; border-width: thin none thin none;" << endl;
//t << " border-style : double; border-color : blue; padding-left : 1em; padding-right : 1em }" << endl;
- t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getVersion()));
+ t << replaceColorMarkers(substitute(ResourceMgr::instance().getAsString("doxygen.css"),"$doxygenversion",getDoxygenVersion()));
endPlainFile();
Doxygen::indexList->addStyleSheetFile("doxygen.css");
}
@@ -2648,7 +2648,7 @@ void HtmlGenerator::writeSearchPage()
t << substituteHtmlKeywords(g_header,"Search","");
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << getVersion() << " -->" << endl;
+ << getDoxygenVersion() << " -->" << endl;
t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "var searchBox = new SearchBox(\"searchBox\", \""
@@ -2701,7 +2701,7 @@ void HtmlGenerator::writeExternalSearchPage()
t << substituteHtmlKeywords(g_header,"Search","");
t << "<!-- " << theTranslator->trGeneratedBy() << " Doxygen "
- << getVersion() << " -->" << endl;
+ << getDoxygenVersion() << " -->" << endl;
t << "<script type=\"text/javascript\">\n";
t << "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */\n";
t << "var searchBox = new SearchBox(\"searchBox\", \""
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index dc8d2fe..f00e6cf 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -791,7 +791,7 @@ static void writeDefaultHeaderPart3(FTextStream &t)
{
// part 3
// Finalize project number
- t << " Doxygen " << getVersion() << "}\\\\\n";
+ t << " Doxygen " << getDoxygenVersion() << "}\\\\\n";
if (Config_getBool(LATEX_TIMESTAMP))
t << "\\vspace*{0.5cm}\n"
"{\\small " << dateToString(TRUE) << "}\\\\\n";
@@ -860,7 +860,7 @@ static void writeDefaultFooter(FTextStream &t)
void LatexGenerator::writeHeaderFile(QFile &f)
{
FTextStream t(&f);
- t << "% Latex header for doxygen " << getVersion() << endl;
+ t << "% Latex header for doxygen " << getDoxygenVersion() << endl;
writeDefaultHeaderPart1(t);
t << "Your title here";
writeDefaultHeaderPart2(t);
@@ -871,14 +871,14 @@ void LatexGenerator::writeHeaderFile(QFile &f)
void LatexGenerator::writeFooterFile(QFile &f)
{
FTextStream t(&f);
- t << "% Latex footer for doxygen " << getVersion() << endl;
+ t << "% Latex footer for doxygen " << getDoxygenVersion() << endl;
writeDefaultFooter(t);
}
void LatexGenerator::writeStyleSheetFile(QFile &f)
{
FTextStream t(&f);
- t << "% stylesheet for doxygen " << getVersion() << endl;
+ t << "% stylesheet for doxygen " << getDoxygenVersion() << endl;
writeDefaultStyleSheet(t);
}
diff --git a/src/layout.cpp b/src/layout.cpp
index 0f47f2a..f84fec0 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -1562,7 +1562,7 @@ void writeDefaultLayoutFile(const char *fileName)
}
QTextStream t(&f);
t.setEncoding(QTextStream::UnicodeUTF8);
- t << substitute(layout_default,"$doxygenversion",getVersion());
+ t << substitute(layout_default,"$doxygenversion",getDoxygenVersion());
}
//----------------------------------------------------------------------------------
diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp
index 0f79c04..4ba3388 100644
--- a/src/resourcemgr.cpp
+++ b/src/resourcemgr.cpp
@@ -144,7 +144,7 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch
}
else
{
- t << substitute(buf,"$doxygenversion",getVersion());
+ t << substitute(buf,"$doxygenversion",getDoxygenVersion());
}
return TRUE;
}
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 221b44c..ae1a77e 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -82,7 +82,7 @@ RTFGenerator::~RTFGenerator()
void RTFGenerator::writeStyleSheetFile(QFile &file)
{
FTextStream t(&file);
- t << "# Generated by doxygen " << getVersion() << "\n\n";
+ t << "# Generated by doxygen " << getDoxygenVersion() << "\n\n";
t << "# This file describes styles used for generating RTF output.\n";
t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
t << "# Remove a hash to activate a line.\n\n";
@@ -99,7 +99,7 @@ void RTFGenerator::writeStyleSheetFile(QFile &file)
void RTFGenerator::writeExtensionsFile(QFile &file)
{
FTextStream t(&file);
- t << "# Generated by doxygen " << getVersion() << "\n\n";
+ t << "# Generated by doxygen " << getDoxygenVersion() << "\n\n";
t << "# This file describes extensions used for generating RTF output.\n";
t << "# All text after a hash (#) is considered a comment and will be ignored.\n";
t << "# Remove a hash to activate a line.\n\n";
@@ -575,7 +575,7 @@ void RTFGenerator::endIndexSection(IndexSections is)
break;
case isTitlePageAuthor:
{
- t << " doxygen.}\n";
+ t << " doxygen" << getDoxygenVersion() << ".}\n";
t << "{\\creatim " << dateToRTFDateString() << "}\n}";
DBG_RTF(t << "{\\comment end of infoblock}\n");
// setup for this section
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index e090717..0296b93 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -982,7 +982,7 @@ void writeJavaScriptSearchIndex()
" \"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << endl;
t << "<html><head><title></title>" << endl;
t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>" << endl;
- t << "<meta name=\"generator\" content=\"Doxygen " << getVersion() << "\"/>" << endl;
+ t << "<meta name=\"generator\" content=\"Doxygen " << getDoxygenVersion() << "\"/>" << endl;
t << "<link rel=\"stylesheet\" type=\"text/css\" href=\"search.css\"/>" << endl;
t << "<script type=\"text/javascript\" src=\"" << baseName << ".js\"></script>" << endl;
t << "<script type=\"text/javascript\" src=\"search.js\"></script>" << endl;
diff --git a/src/util.cpp b/src/util.cpp
index 97d03c5..7a7d56e 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -4730,7 +4730,7 @@ QCString substituteKeywords(const QCString &s,const char *title,
result = substitute(result,"$datetime",dateToString(TRUE));
result = substitute(result,"$date",dateToString(FALSE));
result = substitute(result,"$year",yearToString());
- result = substitute(result,"$doxygenversion",getVersion());
+ result = substitute(result,"$doxygenversion",getDoxygenVersion());
result = substitute(result,"$projectname",projName);
result = substitute(result,"$projectnumber",projNum);
result = substitute(result,"$projectbrief",projBrief);
@@ -8526,6 +8526,20 @@ void writeLatexSpecialFormulaChars(FTextStream &t)
"\n";
}
+QCString getFullVersion()
+{
+ QCString versionString;
+ if (strlen(getGitVersion())>0)
+ {
+ versionString = QCString(getDoxygenVersion())+" ("+getGitVersion()+")";
+ }
+ else
+ {
+ versionString = getDoxygenVersion();
+ }
+ return versionString;
+}
+
//------------------------------------------------------
static int g_usedTableLevels = 0;
diff --git a/src/util.h b/src/util.h
index fc5eee4..07fc375 100644
--- a/src/util.h
+++ b/src/util.h
@@ -501,4 +501,5 @@ int usedTableLevels();
void incUsedTableLevels();
void decUsedTableLevels();
+QCString getFullVersion();
#endif
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index bca5f7b..284332e 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -154,7 +154,7 @@ static void writeXMLHeader(FTextStream &t)
t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
t << "xsi:noNamespaceSchemaLocation=\"compound.xsd\" ";
- t << "version=\"" << getVersion() << "\">" << endl;
+ t << "version=\"" << getDoxygenVersion() << "\">" << endl;
}
static void writeCombineScript()
@@ -1968,7 +1968,7 @@ void generateXML()
t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
t << "<doxygenindex xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
t << "xsi:noNamespaceSchemaLocation=\"index.xsd\" ";
- t << "version=\"" << getVersion() << "\">" << endl;
+ t << "version=\"" << getDoxygenVersion() << "\">" << endl;
{
ClassSDict::Iterator cli(*Doxygen::classSDict);