diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/clangparser.cpp | 9 | ||||
-rw-r--r-- | src/clangparser.h | 6 | ||||
-rw-r--r-- | src/commentcnv.l | 2 | ||||
-rw-r--r-- | src/dirdef.h | 1 | ||||
-rw-r--r-- | src/docgroup.h | 5 | ||||
-rw-r--r-- | src/docparser.cpp | 121 | ||||
-rw-r--r-- | src/docparser.h | 53 | ||||
-rw-r--r-- | src/doctokenizer.l | 1 | ||||
-rw-r--r-- | src/doxygen.cpp | 10 | ||||
-rw-r--r-- | src/ftextstream.h | 1 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 65 | ||||
-rw-r--r-- | src/htmlgen.cpp | 2 | ||||
-rw-r--r-- | src/image.h | 13 | ||||
-rw-r--r-- | src/index.cpp | 6 | ||||
-rw-r--r-- | src/markdown.cpp | 1 | ||||
-rw-r--r-- | src/memberdef.cpp | 1 | ||||
-rw-r--r-- | src/namespacedef.h | 1 | ||||
-rw-r--r-- | src/parserintf.h | 2 | ||||
-rw-r--r-- | src/portable.cpp | 2 | ||||
-rw-r--r-- | src/printdocvisitor.h | 1 | ||||
-rw-r--r-- | src/pycode.l | 11 | ||||
-rw-r--r-- | src/qhpxmlwriter.h | 5 | ||||
-rw-r--r-- | src/resourcemgr.cpp | 1 | ||||
-rw-r--r-- | src/types.h | 1 | ||||
-rw-r--r-- | src/util.cpp | 5 | ||||
-rw-r--r-- | src/util.h | 2 |
26 files changed, 47 insertions, 281 deletions
diff --git a/src/clangparser.cpp b/src/clangparser.cpp index 93f0f03..045b0aa 100644 --- a/src/clangparser.cpp +++ b/src/clangparser.cpp @@ -7,7 +7,6 @@ #include <clang-c/Index.h> #include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/Tooling.h" -#include <qfileinfo.h> #include <stdlib.h> #include "message.h" #include "outputgen.h" @@ -381,10 +380,10 @@ void ClangTUParser::switchToFile(const FileDef *fd) } } -QCString ClangTUParser::lookup(uint line,const char *symbol) +std::string ClangTUParser::lookup(uint line,const char *symbol) { //printf("ClangParser::lookup(%d,%s)\n",line,symbol); - QCString result; + std::string result; if (symbol==0) return result; static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); if (!clangAssistedParsing) return result; @@ -911,9 +910,9 @@ void ClangTUParser::parse() { } -QCString ClangTUParser::lookup(uint,const char *) +std::string ClangTUParser::lookup(uint,const char *) { - return ""; + return std::string(); } class ClangParser::Private diff --git a/src/clangparser.h b/src/clangparser.h index 83aafdd..71a79d5 100644 --- a/src/clangparser.h +++ b/src/clangparser.h @@ -1,10 +1,10 @@ #ifndef CLANGPARSER_H #define CLANGPARSER_H -#include <qcstring.h> -#include <qstrlist.h> #include "containers.h" +#include "types.h" #include <memory> +#include <string> class CodeOutputInterface; class FileDef; @@ -40,7 +40,7 @@ class ClangTUParser /** Looks for \a symbol which should be found at \a line. * returns a clang unique reference to the symbol. */ - QCString lookup(uint line,const char *symbol); + std::string lookup(uint line,const char *symbol); /** writes the syntax highlighted source code for a file * @param[out] ol The output generator list to write to. diff --git a/src/commentcnv.l b/src/commentcnv.l index cacbffa..09583d3 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -29,8 +29,6 @@ #include <stdlib.h> #include <stack> -#include <qglobal.h> - #include "bufstr.h" #include "debug.h" #include "message.h" diff --git a/src/dirdef.h b/src/dirdef.h index d047a99..0e3db91 100644 --- a/src/dirdef.h +++ b/src/dirdef.h @@ -21,7 +21,6 @@ #include <vector> #include <map> -#include <qglobal.h> #include <qcstring.h> class FileList; diff --git a/src/docgroup.h b/src/docgroup.h index c724348..696e4f7 100644 --- a/src/docgroup.h +++ b/src/docgroup.h @@ -3,8 +3,8 @@ * Copyright (C) 1997-2019 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -17,7 +17,6 @@ #define DOCGROUP_H #include <vector> -#include <qstring.h> #include "membergroup.h" class Entry; diff --git a/src/docparser.cpp b/src/docparser.cpp index 6325cd8..d42ae57 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -7323,128 +7323,7 @@ static QCString processCopyDoc(const char *data,uint &len) buf.addChar(0); return buf.get(); } -//--------------------------------------------------------------------------- -QString::Direction getTextDirByConfig(const QString &text) -{ - QCString configDir = Config_getEnum(OUTPUT_TEXT_DIRECTION); - if (configDir == "None") - return QString::DirNeutral; - if (configDir == "Context") - return text.basicDirection(); - if (configDir == "LTR") - { - QString::Direction textDir = text.direction(); - if (textDir == QString::DirMixed) - return QString::DirLTR; - return textDir; - } - if (configDir == "RTL") - { - QString::Direction textDir = text.direction(); - if (textDir == QString::DirMixed) - return QString::DirRTL; - return textDir; - } - return QString::DirNeutral; -} - -QString::Direction getTextDirByConfig(const DocNode *node) -{ - QCString configDir = Config_getEnum(OUTPUT_TEXT_DIRECTION); - if (configDir == "None") - return QString::DirNeutral; - if (configDir == "Context") - return node->getTextBasicDir(); - if (configDir == "LTR") - { - QString::Direction textDir = node->getTextDir(); - if (textDir == QString::DirMixed) - return QString::DirLTR; - return textDir; - } - if (configDir == "RTL") - { - QString::Direction textDir = node->getTextDir(); - if (textDir == QString::DirMixed) - return QString::DirRTL; - return textDir; - } - return QString::DirNeutral; -} -QString::Direction getTextDirByConfig(const DocPara *para, int nodeIndex) -{ - QCString configDir = Config_getEnum(OUTPUT_TEXT_DIRECTION); - if (configDir == "None") - return QString::DirNeutral; - if (configDir == "Context") - return para->getTextBasicDir(nodeIndex); - if (configDir == "LTR") - { - QString::Direction textDir = para->getTextDir(nodeIndex); - if (textDir == QString::DirMixed) - return QString::DirLTR; - return textDir; - } - if (configDir == "RTL") - { - QString::Direction textDir = para->getTextDir(nodeIndex); - if (textDir == QString::DirMixed) - return QString::DirRTL; - return textDir; - } - return QString::DirNeutral; -} - -QCString getDirHtmlClassOfNode(QString::Direction textDir, const QCString &initValue) -{ - QCString classFromDir; - if (textDir == QString::DirLTR) - classFromDir = "DocNodeLTR"; - else if (textDir == QString::DirRTL) - classFromDir = "DocNodeRTL"; - else - classFromDir = ""; - - if (initValue && !classFromDir.isEmpty()) - return QCString(" class=\"") + initValue + " " + classFromDir + "\""; - if (initValue) - return QCString(" class=\"") + initValue + "\""; - if (!classFromDir.isEmpty()) - return QCString(" class=\"") + classFromDir + "\""; - return ""; -} - -QCString getDirHtmlClassOfPage(QCString pageTitle) -{ - QCString result = ""; - result += " class=\"PageDoc"; - QString::Direction titleDir = getTextDirByConfig(pageTitle); - if (titleDir == QString::DirLTR) - result += " PageDocLTR-title"; - else if (titleDir == QString::DirRTL) - result += " PageDocRTL-title"; - result += "\""; - return result; -} - -QCString getHtmlDirEmbeddingChar(QString::Direction textDir) -{ - if (textDir == QString::DirLTR) - return "‪"; - if (textDir == QString::DirRTL) - return "‫"; - return ""; -} - -QCString getJsDirEmbeddingChar(QString::Direction textDir) -{ - if (textDir == QString::DirLTR) - return "\\u202A"; - if (textDir == QString::DirRTL) - return "\\u202B"; - return ""; -} //--------------------------------------------------------------------------- DocRoot *validatingParseDoc(const char *fileName,int startLine, diff --git a/src/docparser.h b/src/docparser.h index fa2b440..3f243e2 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -23,7 +23,6 @@ #include <vector> #include <memory> -#include <qstring.h> #include <qcstring.h> #include "docvisitor.h" @@ -35,15 +34,6 @@ class Definition; class MemberGroup; //--------------------------------------------------------------------------- -QString::Direction getTextDirByConfig(const QString &text); -QString::Direction getTextDirByConfig(const DocNode *node); -QString::Direction getTextDirByConfig(const DocPara *para, int nodeIndex); -QCString getDirHtmlClassOfNode(QString::Direction textDir, const QCString &initValue=""); -QCString getDirHtmlClassOfPage(QCString pageTitle); -QCString getHtmlDirEmbeddingChar(QString::Direction textDir); -QCString getJsDirEmbeddingChar(QString::Direction textDir); -//--------------------------------------------------------------------------- - /*! Main entry point for the documentation parser. * @param fileName File in which the documentation block is found (or the @@ -170,8 +160,8 @@ class DocNode /*! Returns TRUE iff this node is inside a preformatted section */ bool isPreformatted() const { return m_insidePre; } - virtual QString::Direction getTextDir() const { return QString::DirNeutral; } - virtual QString::Direction getTextBasicDir() const { return QString::DirNeutral; } + //virtual QString::Direction getTextDir() const { return QString::DirNeutral; } + //virtual QString::Direction getTextBasicDir() const { return QString::DirNeutral; } protected: /*! Sets whether or not this item is inside a preformatted section */ @@ -200,39 +190,6 @@ class CompAccept : public DocNode } const DocNodeList &children() const { return m_children; } DocNodeList &children() { return m_children; } - QString::Direction getTextDir(uint nodeIndex) const - { - unsigned char resultDir = QString::DirNeutral; - for (const auto &node : m_children) - { - resultDir |= (unsigned char)node->getTextDir(); - if (resultDir == QString::DirMixed) - { - return QString::DirMixed; - } - } - return static_cast<QString::Direction>(resultDir); - } - QString::Direction getTextBasicDir(uint nodeIndex) const - { - for (const auto &node : m_children) - { - QString::Direction nodeDir = node->getTextBasicDir(); - if (nodeDir != QString::DirNeutral) - { - return nodeDir; - } - } - return QString::DirNeutral; - } - virtual QString::Direction getTextDir() const - { - return getTextDir(0); - } - virtual QString::Direction getTextBasicDir() const - { - return getTextBasicDir(0); - } protected: DocNodeList m_children; @@ -248,8 +205,6 @@ class DocWord : public DocNode QCString word() const { return m_word; } Kind kind() const { return Kind_Word; } void accept(DocVisitor *v) { v->visit(this); } - virtual QString::Direction getTextDir() const { return QString(word()).direction(); }; - virtual QString::Direction getTextBasicDir() const { return QString(word()).basicDirection(); }; private: QCString m_word; @@ -271,8 +226,6 @@ class DocLinkedWord : public DocNode QCString anchor() const { return m_anchor; } QCString tooltip() const { return m_tooltip; } void accept(DocVisitor *v) { v->visit(this); } - virtual QString::Direction getTextDir() const { return QString(word()).direction(); }; - virtual QString::Direction getTextBasicDir() const { return QString(word()).basicDirection(); }; private: QCString m_word; @@ -293,8 +246,6 @@ class DocURL : public DocNode Kind kind() const { return Kind_URL; } void accept(DocVisitor *v) { v->visit(this); } bool isEmail() const { return m_isEmail; } - virtual QString::Direction getTextDir() const { return QString::DirLTR; }; - virtual QString::Direction getTextBasicDir() const { return QString::DirLTR; }; private: QCString m_url; diff --git a/src/doctokenizer.l b/src/doctokenizer.l index a717d69..eaf8a43 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -29,7 +29,6 @@ #include <string> #include <qfile.h> -#include <qstring.h> #include "doctokenizer.h" #include "cmdmapper.h" diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 233861c..6257eb8 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -13,23 +13,22 @@ * */ -#include <chrono> -#include <clocale> -#include <locale> - #include <qfileinfo.h> #include <qfile.h> #include <qdir.h> + #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> -#include <qtextcodec.h> #include <errno.h> #include <algorithm> #include <unordered_map> #include <memory> #include <cinttypes> +#include <chrono> +#include <clocale> +#include <locale> #include "version.h" #include "doxygen.h" @@ -11951,7 +11950,6 @@ void generateOutput() thisDir.remove(Doxygen::filterDBFileName); finishWarnExit(); Config::deinit(); - QTextCodec::deleteAllCodecs(); delete Doxygen::clangUsrMap; g_successfulRun=TRUE; } diff --git a/src/ftextstream.h b/src/ftextstream.h index 5b6a9ca..8e56174 100644 --- a/src/ftextstream.h +++ b/src/ftextstream.h @@ -4,7 +4,6 @@ #include <stdio.h> #include <qiodevice.h> -#include <qstring.h> #include <qgstring.h> /** @brief Simplified and optimized version of QTextStream */ diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 6d761eb..2ad0e19 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -961,9 +961,8 @@ void HtmlDocVisitor::visitPre(DocAutoList *l) } else { - m_t << "<ul"; + m_t << "<ul>"; } - m_t << getDirHtmlClassOfNode(getTextDirByConfig(l)) << ">"; if (!l->isPreformatted()) m_t << "\n"; } @@ -1229,7 +1228,6 @@ void HtmlDocVisitor::visitPre(DocPara *p) // if the first element of a paragraph is something that should be outside of // the paragraph (<ul>,<dl>,<table>,..) then that will already started the // paragraph and we don't need to do it here - bool paragraphAlreadyStarted = false; size_t nodeIndex = 0; if (p && nodeIndex<p->children().size()) { @@ -1242,7 +1240,6 @@ void HtmlDocVisitor::visitPre(DocPara *p) const DocNode *n = p->children().at(nodeIndex).get(); if (mustBeOutsideParagraph(n)) { - paragraphAlreadyStarted = true; needsTag = FALSE; } } @@ -1261,9 +1258,7 @@ void HtmlDocVisitor::visitPre(DocPara *p) //printf(" needsTag=%d\n",needsTag); // write the paragraph tag (if needed) if (needsTag) - m_t << "<p" << getDirHtmlClassOfNode(getTextDirByConfig(p), contexts[t]) << htmlAttribsToString(p->attribs()) << ">"; - else if(!paragraphAlreadyStarted) - m_t << getHtmlDirEmbeddingChar(getTextDirByConfig(p)) << htmlAttribsToString(p->attribs()); + m_t << "<p class=\"" << contexts[t] << "\"" << htmlAttribsToString(p->attribs()) << ">"; } void HtmlDocVisitor::visitPost(DocPara *p) @@ -1343,10 +1338,7 @@ void HtmlDocVisitor::visitPre(DocSimpleSect *s) { if (m_hide) return; forceEndParagraph(s); - if (s->type() != DocSimpleSect::Return) - m_t << "<dl" << getDirHtmlClassOfNode(getTextDirByConfig(s), "section " + s->typeString()) << "><dt>"; - else - m_t << "<dl class=\"section " << s->typeString() << "\"><dt>"; + m_t << "<dl class=\"section " << s->typeString() << "\"><dt>"; switch(s->type()) { case DocSimpleSect::See: @@ -1442,7 +1434,7 @@ void HtmlDocVisitor::visitPre(DocSection *s) { if (m_hide) return; forceEndParagraph(s); - m_t << "<h" << s->level() << getDirHtmlClassOfNode(getTextDirByConfig(s->title())) << ">"; + m_t << "<h" << s->level() << ">"; m_t << "<a class=\"anchor\" id=\"" << s->anchor(); m_t << "\"></a>" << endl; filter(convertCharEntitiesToUTF8(s->title().data())); @@ -1466,7 +1458,7 @@ void HtmlDocVisitor::visitPre(DocHtmlList *s) { m_t << "<ul" << htmlAttribsToString(s->attribs()); } - m_t << getDirHtmlClassOfNode(getTextDirByConfig(s)) << ">\n"; + m_t << ">\n"; } void HtmlDocVisitor::visitPost(DocHtmlList *s) @@ -1514,9 +1506,7 @@ void HtmlDocVisitor::visitPost(DocHtmlDescList *dl) void HtmlDocVisitor::visitPre(DocHtmlDescTitle *dt) { if (m_hide) return; - m_t << "<dt" << htmlAttribsToString(dt->attribs()) - << getDirHtmlClassOfNode(getTextDirByConfig(dt)) - << ">"; + m_t << "<dt" << htmlAttribsToString(dt->attribs()) << ">"; } void HtmlDocVisitor::visitPost(DocHtmlDescTitle *) @@ -1528,9 +1518,7 @@ void HtmlDocVisitor::visitPost(DocHtmlDescTitle *) void HtmlDocVisitor::visitPre(DocHtmlDescData *dd) { if (m_hide) return; - m_t << "<dd" << htmlAttribsToString(dd->attribs()) - << getDirHtmlClassOfNode(getTextDirByConfig(dd)) - << ">"; + m_t << "<dd" << htmlAttribsToString(dd->attribs()) << ">"; } void HtmlDocVisitor::visitPost(DocHtmlDescData *) @@ -1557,21 +1545,11 @@ void HtmlDocVisitor::visitPre(DocHtmlTable *t) QCString attrs = htmlAttribsToString(t->attribs()); if (attrs.isEmpty()) { - m_t << "<table"; - if(t->hasCaption()) - m_t << getDirHtmlClassOfNode(getTextDirByConfig(t->caption()), "doxtable"); - else - m_t << getDirHtmlClassOfNode(getTextDirByConfig(t), "doxtable"); - m_t << ">\n"; + m_t << "<table class=\"doxtable\">\n"; } else { - m_t << "<table"; - if (t->hasCaption()) - m_t << getDirHtmlClassOfNode(getTextDirByConfig(t->caption())); - else - m_t << getDirHtmlClassOfNode(getTextDirByConfig(t)); - m_t << htmlAttribsToString(t->attribs()) << ">\n"; + m_t << "<table" << htmlAttribsToString(t->attribs()) << ">\n"; } } @@ -1663,10 +1641,7 @@ void HtmlDocVisitor::visitPre(DocHtmlHeader *header) { if (m_hide) return; forceEndParagraph(header); - m_t << "<h" << header->level() - << htmlAttribsToString(header->attribs()) - << getDirHtmlClassOfNode(getTextDirByConfig(header)) - << ">"; + m_t << "<h" << header->level() << htmlAttribsToString(header->attribs()) << ">"; } void HtmlDocVisitor::visitPost(DocHtmlHeader *header) @@ -1761,7 +1736,6 @@ void HtmlDocVisitor::visitPre(DocImage *img) else { m_t << "<div class=\"caption\">" << endl; - m_t << getHtmlDirEmbeddingChar(getTextDirByConfig(img)); } } else if (inlineImage) @@ -2054,8 +2028,7 @@ void HtmlDocVisitor::visitPre(DocXRefItem *x) bool anonymousEnum = x->file()=="@"; if (!anonymousEnum) { - m_t << "<dl" << getDirHtmlClassOfNode(getTextDirByConfig(x), x->key()) - << "><dt><b><a class=\"el\" href=\"" + m_t << "<dl class=\"" << x->key() << "\"><dt><b><a class=\"el\" href=\"" << x->relPath() << addHtmlExtensionIfMissing(x->file()) << "#" << x->anchor() << "\">"; } @@ -2103,16 +2076,7 @@ void HtmlDocVisitor::visitPre(DocHtmlBlockQuote *b) if (m_hide) return; forceEndParagraph(b); QCString attrs = htmlAttribsToString(b->attribs()); - if (attrs.isEmpty()) - { - m_t << "<blockquote" << getDirHtmlClassOfNode(getTextDirByConfig(b), "doxtable") - << ">\n"; - } - else - { - m_t << "<blockquote" << getDirHtmlClassOfNode(getTextDirByConfig(b)) - << htmlAttribsToString(b->attribs()) << ">\n"; - } + m_t << "<blockquote class=\"doxtable\"" << htmlAttribsToString(b->attribs()) << ">\n"; } void HtmlDocVisitor::visitPost(DocHtmlBlockQuote *b) @@ -2476,10 +2440,7 @@ void HtmlDocVisitor::forceStartParagraph(DocNode *n) if (isFirst && isLast) needsTag = FALSE; //printf("forceStart first=%d last=%d needsTag=%d\n",isFirst,isLast,needsTag); - if (needsTag) - m_t << "<p" << getDirHtmlClassOfNode(getTextDirByConfig(para, nodeIndex)) << ">"; - else - m_t << getHtmlDirEmbeddingChar(getTextDirByConfig(para, nodeIndex)); + if (needsTag) m_t << "<p>"; } } diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 3f335e5..ebf7aea 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -2549,7 +2549,7 @@ void HtmlGenerator::endContents() void HtmlGenerator::startPageDoc(const char *pageTitle) { - t << "<div" << getDirHtmlClassOfPage(pageTitle) << ">"; + t << "<div>"; } void HtmlGenerator::endPageDoc() diff --git a/src/image.h b/src/image.h index 435321a..6eb2c21 100644 --- a/src/image.h +++ b/src/image.h @@ -1,13 +1,13 @@ /****************************************************************************** * - * + * * * * Copyright (C) 1997-2015 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -18,7 +18,8 @@ #ifndef _IMAGE_H #define _IMAGE_H -#include <qglobal.h> + +#include "types.h" /** Class representing a bitmap image generated by doxygen. */ class Image @@ -26,7 +27,7 @@ class Image public: Image(uint w,uint h); ~Image(); - + void setPixel(uint x,uint y,uchar val); uchar getPixel(uint x,uint y) const; void writeChar(uint x,uint y,char c,uchar fg); @@ -43,7 +44,7 @@ class Image uint height() const { return m_height; } uchar *data() const { return m_data; } static uint stringLength(const char *s); - + private: uint m_width; uint m_height; diff --git a/src/index.cpp b/src/index.cpp index d9eb7ab..7a31f0f 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -4801,7 +4801,7 @@ void renderMemberIndicesAsJs(FTextStream &t, firstMember=FALSE; } t << endl << "{text:\"" << convertToJSString(getInfo(i)->title) << "\",url:\"" - << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension, false) << "\""; + << convertToJSString(getInfo(i)->fname+Doxygen::htmlFileExtension) << "\""; // Check if we have many members, then add sub entries per letter... // quick alphabetical index @@ -4829,7 +4829,7 @@ void renderMemberIndicesAsJs(FTextStream &t, else // other pages of multi page index anchor=fullName+"_"+is+extension+"#index_"; t << "{text:\"" << convertToJSString(ci) << "\",url:\"" - << convertToJSString(anchor+convertToId(is), false) << "\"}"; + << convertToJSString(anchor+convertToId(is)) << "\"}"; firstLetter=FALSE; } t << "]"; @@ -4863,7 +4863,7 @@ static bool renderQuickLinksAsJs(FTextStream &t,LayoutNavEntry *root,bool first) firstChild=FALSE; QCString url = entry->url(); t << "{text:\"" << convertToJSString(entry->title()) << "\",url:\"" - << convertToJSString(url, false) << "\""; + << convertToJSString(url) << "\""; bool hasChildren=FALSE; if (entry->kind()==LayoutNavEntry::NamespaceMembers) { diff --git a/src/markdown.cpp b/src/markdown.cpp index 185a43e..eaa9ef7 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -32,7 +32,6 @@ */ #include <stdio.h> -#include <qglobal.h> #include <qfileinfo.h> #include <unordered_map> diff --git a/src/memberdef.cpp b/src/memberdef.cpp index dde9eae..81520a2 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -15,7 +15,6 @@ #include <stdio.h> -#include <qglobal.h> #include <assert.h> #include "md5.h" diff --git a/src/namespacedef.h b/src/namespacedef.h index e644a32..d41cc20 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -18,7 +18,6 @@ #include <set> -#include <qstrlist.h> #include "definition.h" #include "filedef.h" #include "linkedmap.h" diff --git a/src/parserintf.h b/src/parserintf.h index 2fde2f1..05b3adf 100644 --- a/src/parserintf.h +++ b/src/parserintf.h @@ -18,8 +18,6 @@ #ifndef PARSERINTF_H #define PARSERINTF_H -#include <qstrlist.h> - #include <functional> #include <memory> #include <map> diff --git a/src/portable.cpp b/src/portable.cpp index 85a6718..4cf3244 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -17,8 +17,6 @@ extern char **environ; #endif #include <ctype.h> -#include <qglobal.h> -#include <qglobal.h> #include <qdir.h> #include <map> #include <string> diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index 40dd513..2992717 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -19,7 +19,6 @@ #ifndef _PRINTDOCVISITOR_H #define _PRINTDOCVISITOR_H -#include <qglobal.h> #include "docvisitor.h" #include "htmlentity.h" #include "emoji.h" diff --git a/src/pycode.l b/src/pycode.l index f63e885..107d855 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -69,7 +69,7 @@ struct pycodeYY_state { std::unordered_map< std::string, ScopedTypeVariant > codeClassMap; QCString curClassName; - QStrList curClassBases; + StringVector curClassBases; CodeOutputInterface * code = 0; const char * inputString = 0; //!< the code fragment as text @@ -380,7 +380,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU // probably be more strict // about what to accept. - yyextra->curClassBases.inSort(yytext); + yyextra->curClassBases.push_back(yytext); generateClassOrGlobalLink(yyscanner,*yyextra->code,yytext); // codify(yyscanner,yytext); } @@ -397,8 +397,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU std::unique_ptr<ClassDef> classDefToAdd { createClassDef("<code>",1,1,yyextra->curClassName,ClassDef::Class,0,0,FALSE) }; ScopedTypeVariant var(yyextra->curClassName); - char *s=yyextra->curClassBases.first(); - while (s) + for (const auto &s : yyextra->curClassBases) { const ClassDef *baseDefToAdd = 0; // find class in the local scope @@ -410,15 +409,13 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBU // Try to find class in global scope if (baseDefToAdd==0) { - baseDefToAdd=yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,s); + baseDefToAdd=yyextra->symbolResolver.resolveClass(yyextra->currentDefinition,s.c_str()); } if (baseDefToAdd && baseDefToAdd->name()!=yyextra->curClassName) { var.localDef()->insertBaseClass(baseDefToAdd->name()); } - - s=yyextra->curClassBases.next(); } yyextra->codeClassMap.emplace(std::make_pair(yyextra->curClassName.str(),std::move(var))); diff --git a/src/qhpxmlwriter.h b/src/qhpxmlwriter.h index f75414b..5541edd 100644 --- a/src/qhpxmlwriter.h +++ b/src/qhpxmlwriter.h @@ -3,8 +3,8 @@ * Copyright (C) 2008 Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * @@ -17,7 +17,6 @@ #ifndef QHPXMLWRITER_H #define QHPXMLWRITER_H -#include <qstring.h> #include "ftextstream.h" class QFile; diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp index 36ce30d..b0361f0 100644 --- a/src/resourcemgr.cpp +++ b/src/resourcemgr.cpp @@ -16,7 +16,6 @@ #include <map> #include <qfile.h> #include <qcstring.h> -#include <qglobal.h> #include <string.h> #include "resourcemgr.h" diff --git a/src/types.h b/src/types.h index bf24fd9..0038011 100644 --- a/src/types.h +++ b/src/types.h @@ -16,7 +16,6 @@ #ifndef TYPES_H #define TYPES_H -#include <string.h> #include <qcstring.h> /** @file diff --git a/src/util.cpp b/src/util.cpp index 6599b42..6c098e8 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -4148,7 +4148,6 @@ QCString convertToHtml(const char *s,bool keepEntities) { if (s==0) return ""; GrowBuf growBuf; - growBuf.addStr(getHtmlDirEmbeddingChar(getTextDirByConfig(s))); const char *p=s; char c; while ((c=*p++)) @@ -4205,12 +4204,10 @@ QCString convertToHtml(const char *s,bool keepEntities) return growBuf.get(); } -QCString convertToJSString(const char *s, bool applyTextDir) +QCString convertToJSString(const char *s) { if (s==0) return ""; GrowBuf growBuf; - if (applyTextDir) - growBuf.addStr(getJsDirEmbeddingChar(getTextDirByConfig(s))); const char *p=s; char c; while ((c=*p++)) @@ -255,7 +255,7 @@ QCString convertToXML(const char *s, bool keepEntities=FALSE); QCString convertToDocBook(const char *s); -QCString convertToJSString(const char *s, bool applyTextDir = true); +QCString convertToJSString(const char *s); QCString convertToPSString(const char *s); |