Skip to content

Commit

Permalink
Merge branch 'master' of github.com:doxygen/doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Mar 31, 2024
2 parents d204875 + 7555021 commit 073c082
Show file tree
Hide file tree
Showing 47 changed files with 140 additions and 46 deletions.
4 changes: 4 additions & 0 deletions src/htmlhelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,10 @@ void HtmlHelp::Private::createProjectFile()
{
t << "Compiled file=" << Config_getString(CHM_FILE) << "\n";
}
else
{
t << "Compiled file=index.chm\n";
}
t << "Compatibility=1.1\n"
"Full-text search=Yes\n";
if (ctsItemPresent) t << "Contents file=" + hhcFileName + "\n";
Expand Down
2 changes: 1 addition & 1 deletion src/moduledef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class ModuleDefImpl : public DefinitionMixin<ModuleDef>

QCString ModuleDefImpl::getOutputFileBase() const
{
return "module_"+convertNameToFile(name());
return convertNameToFile("module_" + name());
}

QCString ModuleDefImpl::qualifiedName() const
Expand Down
90 changes: 90 additions & 0 deletions src/sitemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "portable.h"
#include "language.h"
#include "version.h"
#include "containers.h"

//-------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -86,6 +87,7 @@ class Crawlmap::Private
public:
std::ofstream crawlFile;
TextStream crawl;
StringSet crawlLinks;
};

Crawlmap::Crawlmap() : p(std::make_unique<Private>()) {}
Expand Down Expand Up @@ -117,6 +119,11 @@ void Crawlmap::initialize()

void Crawlmap::finalize()
{
for (auto &s : p->crawlLinks)
{
p->crawl << "<a href=\"" << s << "\"/>\n";
}

p->crawl << "</body>\n";
p->crawl << "</html>\n";
p->crawl.flush();
Expand All @@ -130,3 +137,86 @@ void Crawlmap::addIndexFile(const QCString & fileName)
p->crawl << "<a href=\"" << fn << "\"/>\n";
}

void Crawlmap::addContentsItem(bool, const QCString &, const QCString &,
const QCString & file, const QCString & anchor,
bool ,bool ,
const Definition *)
{
if (!file.isEmpty()) // made file optional param - KPW
{
std::string link;
if (file[0]=='!' || file[0]=='^') // special markers for user defined URLs
{
link+=&file[1];
}
else
{
QCString currFile = file;
addHtmlExtensionIfMissing(currFile);
QCString currAnc = anchor;
link += currFile.data();
if (!currAnc.isEmpty())
{
link += "#";
link += currAnc.str();
}
}
p->crawlLinks.insert(link);
}
}

static QCString makeFileName(const QCString & withoutExtension)
{
QCString result=withoutExtension;
if (!result.isEmpty())
{
if (result.at(0)=='!') // relative URL -> strip marker
{
result=result.mid(1);
}
else // add specified HTML extension
{
addHtmlExtensionIfMissing(result);
}
}
return result;
}

static QCString makeRef(const QCString & withoutExtension, const QCString & anchor)
{
if (withoutExtension.isEmpty()) return QCString();
QCString result = makeFileName(withoutExtension);
if (anchor.isEmpty()) return result;
return result+"#"+anchor;
}
void Crawlmap::addIndexItem(const Definition *context, const MemberDef *md,
const QCString &sectionAnchor, const QCString &title)
{
if (md) // member
{
bool separateMemberPages = Config_getBool(SEPARATE_MEMBER_PAGES);
if (context==nullptr) // global member
{
if (md->getGroupDef())
context = md->getGroupDef();
else if (md->getFileDef())
context = md->getFileDef();
}
if (context==nullptr) return; // should not happen
QCString cfname = md->getOutputFileBase();
//QCString argStr = md->argsString();
QCString cfiname = context->getOutputFileBase();
QCString contRef = separateMemberPages ? cfname : cfiname;
QCString anchor = !sectionAnchor.isEmpty() ? sectionAnchor : md->anchor();
QCString ref;

ref = makeRef(contRef, anchor);
p->crawlLinks.insert(ref.str());
}
else if (context) // container
{
QCString contRef = context->getOutputFileBase();
QCString ref = makeRef(contRef,sectionAnchor);
p->crawlLinks.insert(ref.str());
}
}
4 changes: 2 additions & 2 deletions src/sitemap.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class Crawlmap
void addContentsItem(bool isDir, const QCString & name, const QCString & ref,
const QCString & file, const QCString & anchor,
bool separateIndex,bool addToNavIndex,
const Definition *def){}
const Definition *def);
void addIndexItem(const Definition *context, const MemberDef *md,
const QCString &sectionAnchor, const QCString &title){}
const QCString &sectionAnchor, const QCString &title);
void addIndexFile(const QCString & name);
void addImageFile(const QCString & name){}
void addStyleSheetFile(const QCString & name){}
Expand Down
2 changes: 1 addition & 1 deletion src/translator.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class Translator

// index titles (the project name is prepended for these)

virtual QCString trDocumentation(const QCString projName) = 0;
virtual QCString trDocumentation(const QCString &projName) = 0;
virtual QCString trModuleIndex() = 0;
virtual QCString trHierarchicalIndex() = 0;
virtual QCString trCompoundIndex() = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/translator_am.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0


/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + " - Փաստագրություն"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_ar.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class TranslatorArabic : public TranslatorAdapter_1_4_6


/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "التوثيق"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_bg.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class TranslatorBulgarian : public TranslatorAdapter_1_9_4
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Документация"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_br.h
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ class TranslatorBrazilian : public Translator
{ return "Lista de todos os módulos:"; }

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return "Documentação" + (!projName.isEmpty()? " de " + projName : ""); }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_ca.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_8_0


/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + ": Documentació"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_cn.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class TranslatorChinese : public Translator
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "文档"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_cz.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ class TranslatorCzech : public TranslatorAdapter_1_9_6
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentace"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_de.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ class TranslatorGerman : public TranslatorAdapter_1_8_15
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentation"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_dk.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
{ return "Her er en liste over alle moduler:"; }

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentation"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_en.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class TranslatorEnglish : public Translator
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Documentation"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_eo.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class TranslatorEsperanto : public TranslatorAdapter_1_8_4
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentado"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_es.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_9_6
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return "Documentación" + (!projName.isEmpty()? " de " + projName : ""); }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_fa.h
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class TranslatorPersian : public TranslatorAdapter_1_7_5


/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return "مستندات" + (!projName.isEmpty()?" " + projName : ""); }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_fi.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_6_0
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentaatio"; } // "Documentation"

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class TranslatorFrench : public TranslatorAdapter_1_9_5
{ return "Liste de tous les modules :"; }

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Documentation"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_gr.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class TranslatorGreek : public TranslatorAdapter_1_11_0


/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Τεκμηρίωση"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_hi.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class TranslatorHindi : public TranslatorAdapter_1_9_4
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "दस्तावेज़ीकरण"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_hr.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_8_2
QCString trModulesDescription() override
{ return "Popis svih modula:"; }

QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentacija"; }
QCString trModuleIndex() override
{ return "Kazalo modula"; }
Expand Down
2 changes: 1 addition & 1 deletion src/translator_hu.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_8_15


/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentáció"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ class TranslatorIndonesian : public TranslatorAdapter_1_8_0
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentasi"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_it.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class TranslatorItalian : public TranslatorAdapter_1_8_15
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Documentazione"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_jp.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
{ return "全モジュールの一覧です。"; }

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "詳解"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_kr.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "문서화"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_lt.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class TranslatorLithuanian : public TranslatorAdapter_1_4_6
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentacija"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_lv.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Dokumentācija"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_mk.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class TranslatorMacedonian : public TranslatorAdapter_1_6_0
// index titles (the project name is prepended for these)

/*! This is used in HTML as the title of index.html. */
QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Документација"; }

/*! This is used in LaTeX as the title of the chapter with the
Expand Down
2 changes: 1 addition & 1 deletion src/translator_nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class TranslatorDutch : public Translator
QCString trModulesDescription() override
{ return "Hieronder volgt de lijst met alle modules:"; }

QCString trDocumentation(const QCString projName) override
QCString trDocumentation(const QCString &projName) override
{ return (!projName.isEmpty()?projName + " " : "") + "Documentatie"; }
QCString trModuleIndex() override
{ return "Module Index"; }
Expand Down

0 comments on commit 073c082

Please sign in to comment.