diff options
-rw-r--r-- | addon/doxyparse/README | 10 | ||||
-rw-r--r-- | addon/doxyparse/doxyparse.cpp | 35 | ||||
-rw-r--r-- | doc/changelog.doc | 2 | ||||
-rw-r--r-- | qtools/qdir.cpp | 8 | ||||
-rw-r--r-- | qtools/qgvector.cpp | 2 | ||||
-rw-r--r-- | qtools/qstring.h | 6 | ||||
-rw-r--r-- | qtools/qtl.doc | 2 | ||||
-rw-r--r-- | qtools/qxml.cpp | 2 | ||||
-rw-r--r-- | src/code.l | 2 | ||||
-rw-r--r-- | src/config.xml | 2 | ||||
-rw-r--r-- | src/ftvhelp.cpp | 4 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 9 | ||||
-rw-r--r-- | src/index.cpp | 7 | ||||
-rwxr-xr-x | src/languages.py | 2 | ||||
-rw-r--r-- | src/markdown.cpp | 2 | ||||
-rw-r--r-- | src/scanner.l | 25 | ||||
-rw-r--r-- | src/searchindex.cpp | 1 | ||||
-rw-r--r-- | src/template.h | 4 | ||||
-rw-r--r-- | src/translator_cn.h | 2 | ||||
-rw-r--r-- | src/util.cpp | 8 | ||||
-rw-r--r-- | templates/html/doxygen.css | 46 |
21 files changed, 141 insertions, 40 deletions
diff --git a/addon/doxyparse/README b/addon/doxyparse/README index 9f7429c..288b31e 100644 --- a/addon/doxyparse/README +++ b/addon/doxyparse/README @@ -5,16 +5,24 @@ This directory contains an "source parsing engine" based on doxyapp code. More info and source code repository: https://github.com/analizo/doxygen +## build dependencies + + apt-get install flex bison cmake build-essential python + ## build cmake -G "Unix Makefiles" -Dbuild_parse=ON make +## install + + sudo make install + AUTHORS ======= Antonio Terceiro <terceiro@softwarelivre.org> João M. Miranda <joaomm88@gmail.com> -Joenio Costa <joenio@colivre.coop.br> +Joenio Costa <joenio@joenio.me> Paulo Meirelles <paulo@softwarelivre.org> Vinicius Daros <vkdaros@mercurio.eclipse.ime.usp.br> diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index 6a1886c..584e8b0 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -138,7 +138,7 @@ static void printDefines() { modules[current_module] = true; } static void printDefinition(std::string type, std::string signature, int line) { - printf(" - %s:\n", signature.c_str()); + printf(" - \"%s\":\n", signature.c_str()); printf(" type: %s\n", type.c_str()); printf(" line: %d\n", line); } @@ -155,7 +155,7 @@ static void printUses() { printf(" uses:\n"); } static void printReferenceTo(std::string type, std::string signature, std::string defined_in) { - printf(" - %s:\n", signature.c_str()); + printf(" - \"%s\":\n", signature.c_str()); printf(" type: %s\n", type.c_str()); printf(" defined_in: %s\n", defined_in.c_str()); } @@ -167,6 +167,24 @@ static int isPartOfCStruct(MemberDef * md) { return is_c_code && md->getClassDef() != NULL; } +std::string removeDoubleQuotes(std::string data) { + // remove surrounding double quotes + if (data.front() == '"' && data.back() == '"') { + data.erase(0, 1); // first double quote + data.erase(data.size() - 1); // last double quote + } + return data; +} + +std::string argumentData(Argument *argument) { + std::string data = ""; + if (argument->type != NULL) + data = removeDoubleQuotes(argument->type.data()); + else if (argument->name != NULL) + data = removeDoubleQuotes(argument->name.data()); + return data; +} + std::string functionSignature(MemberDef* md) { std::string signature = md->name().data(); if(md->isFunction()){ @@ -175,9 +193,9 @@ std::string functionSignature(MemberDef* md) { signature += "("; Argument * argument = iterator.toFirst(); if(argument != NULL) { - signature += argument->type.data(); - for(++iterator; (argument = iterator.current()) ;++iterator){ - signature += std::string(",") + argument->type.data(); + signature += argumentData(argument); + for(++iterator; (argument = iterator.current()); ++iterator){ + signature += std::string(",") + argumentData(argument); } } signature += ")"; @@ -245,7 +263,7 @@ static void lookupSymbol(Definition *d) { std::string signature = functionSignature(md); printDefinition(type, signature, md->getDefLine()); if (md->protection() == Public) { - printProtection("protection public"); + printProtection("public"); } if (md->isFunction()) { functionInformation(md); @@ -311,7 +329,10 @@ static void detectProgrammingLanguage(FileNameListIterator& fnli) { checkLanguage(filename, ".cc") || checkLanguage(filename, ".cxx") || checkLanguage(filename, ".cpp") || - checkLanguage(filename, ".java") + checkLanguage(filename, ".java") || + checkLanguage(filename, ".py") || + checkLanguage(filename, ".pyw") || + checkLanguage(filename, ".cs") ) { is_c_code = false; } diff --git a/doc/changelog.doc b/doc/changelog.doc index 3efb31e..0dcbfa9 100644 --- a/doc/changelog.doc +++ b/doc/changelog.doc @@ -285,7 +285,7 @@ <li>Fix STRIP_FROM_PATH when running from drive root [<a href="http://github.com/doxygen/doxygen/commit/fd808ae3c1e37a8d476d250cf6b4325624a9eccb">view</a>] <li>Fix Windows build instructions. [<a href="http://github.com/doxygen/doxygen/commit/eec8d0a31161746041fc94ccbba5a54aecd8cf93">view</a>] <li>Fix documentation typos [<a href="http://github.com/doxygen/doxygen/commit/770adb37b2072bbea5412f9cc2058d98d1de60e4">view</a>] -<li>Fix for HTML output when using server side search and the the new menu bar [<a href="http://github.com/doxygen/doxygen/commit/0faf45600c6c640bfaf11b017d43a4b9de193ebf">view</a>] +<li>Fix for HTML output when using server side search and the new menu bar [<a href="http://github.com/doxygen/doxygen/commit/0faf45600c6c640bfaf11b017d43a4b9de193ebf">view</a>] <li>Fix for changed references due to different removeRedudantWhiteSpace() implementation [<a href="http://github.com/doxygen/doxygen/commit/f26cc41d0d3d436c809c293a56c66c1f5f953745">view</a>] <li>Fix for empty file name [<a href="http://github.com/doxygen/doxygen/commit/0fead5249b8ef2c3c5cbbbd712855bae877aa27b">view</a>] <li>Fix for error in travis.yml [<a href="http://github.com/doxygen/doxygen/commit/81cf39f249c58db66368d60d596ac164d886ae90">view</a>] diff --git a/qtools/qdir.cpp b/qtools/qdir.cpp index 120abe7..782a9c6 100644 --- a/qtools/qdir.cpp +++ b/qtools/qdir.cpp @@ -705,7 +705,7 @@ QStrList QDir::encodedEntryList( const QString &nameFilter, indicated by the setSorting(), setFilter() and setNameFilter() specifications. - The the filter and sorting specifications can be overridden using the + The filter and sorting specifications can be overridden using the \e filterSpec and \e sortSpec arguments. Returns an empty list if the directory is unreadable or does not exist. @@ -727,7 +727,7 @@ QStringList QDir::entryList( int filterSpec, int sortSpec ) const indicated by the setSorting(), setFilter() and setNameFilter() specifications. - The the filter and sorting specifications can be overridden using the + The filter and sorting specifications can be overridden using the \e nameFilter, \e filterSpec and \e sortSpec arguments. Returns and empty list if the directory is unreadable or does not exist. @@ -755,7 +755,7 @@ QStringList QDir::entryList( const QString &nameFilter, the directory pointed to using the setSorting(), setFilter() and setNameFilter() specifications. - The the filter and sorting specifications can be overridden using the + The filter and sorting specifications can be overridden using the \e filterSpec and \e sortSpec arguments. Returns 0 if the directory is unreadable or does not exist. @@ -782,7 +782,7 @@ const QFileInfoList *QDir::entryInfoList( int filterSpec, int sortSpec ) const the directory pointed to using the setSorting(), setFilter() and setNameFilter() specifications. - The the filter and sorting specifications can be overridden using the + The filter and sorting specifications can be overridden using the \e nameFilter, \e filterSpec and \e sortSpec arguments. Returns 0 if the directory is unreadable or does not exist. diff --git a/qtools/qgvector.cpp b/qtools/qgvector.cpp index 88409ce..63cce64 100644 --- a/qtools/qgvector.cpp +++ b/qtools/qgvector.cpp @@ -68,7 +68,7 @@ the QVector collection class. QGVector has some virtual functions that may be reimplemented in - subclasses to to customize behavior. + subclasses to customize behavior. <ul> <li> compareItems() compares two collection/vector items. diff --git a/qtools/qstring.h b/qtools/qstring.h index 5fcff29..d459132 100644 --- a/qtools/qstring.h +++ b/qtools/qstring.h @@ -384,7 +384,7 @@ public: * - As return value for basicDirection(), it means that the first strong character * of the source string has a left-to-right direction. */ - DirLTR = 0b01, + DirLTR = 0x1, /// Right-to-left text. /*! * - As return value for direction(), it means that the source string @@ -392,13 +392,13 @@ public: * - As return value for basicDirection(), it means that the first strong character * of the source string has a right-to-left direction. */ - DirRTL = 0b10, + DirRTL = 0x2, /// Mixed-directional text /*! * As return value for direction(), it means that the source string * contains both left-to-right and right-to-left characters. */ - DirMixed = 0b11 + DirMixed = 0x3 }; //QT_STATIC_CONST QString null; diff --git a/qtools/qtl.doc b/qtools/qtl.doc index db5b994..e83b177 100644 --- a/qtools/qtl.doc +++ b/qtools/qtl.doc @@ -111,7 +111,7 @@ end() returns an iterator that points \e after the last element. end() marks an invalid position, it can never be dereferenced. It's the break condition in any iteration, may it be from begin() or fromLast(). For maximum speed, use increment or -decrement iterators with the prefix operator (++it, --it) instead of the the +decrement iterators with the prefix operator (++it, --it) instead of the postfix one (it++, it--), since the former is slightly faster. The same concept applies to the other container classes: diff --git a/qtools/qxml.cpp b/qtools/qxml.cpp index 072997e..4138a28 100644 --- a/qtools/qxml.cpp +++ b/qtools/qxml.cpp @@ -1959,7 +1959,7 @@ bool QXmlSimpleReader::feature( const QString& name, bool *ok ) const <li> http://xml.org/sax/features/namespaces: if this feature is TRUE, namespace processing is performed <li> http://xml.org/sax/features/namespace-prefixes: - if this feature is TRUE, the the original prefixed names and attributes + if this feature is TRUE, the original prefixed names and attributes used for namespace declarations are reported <li> http://trolltech.com/xml/features/report-whitespace-only-CharData: if this feature is TRUE, CharData that consists only of whitespace (and @@ -904,7 +904,7 @@ static bool getLinkInScope(const QCString &c, // scope return TRUE; } } - else // found member, but is is not linkable, so make sure content inside is not assign + else // found member, but it is not linkable, so make sure content inside is not assigned // to the previous member, see bug762760 { DBG_CTX((stderr,"unlinkable member %s\n",md->name().data())); diff --git a/src/config.xml b/src/config.xml index ca33470..38dfefb 100644 --- a/src/config.xml +++ b/src/config.xml @@ -1559,7 +1559,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn" <docs> <![CDATA[ If the \c REFERENCED_BY_RELATION tag is set to \c YES - then for each documented function all documented + then for each documented entity all documented functions referencing it will be listed. ]]> </docs> diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index b04da62..14c94a3 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -302,6 +302,10 @@ void FTVHelp::generateLink(FTextStream &t,FTVNode *n) else t << "\" target=\"_self\">"; } + else + { + t << ">"; + } t << convertToHtml(n->name); t << "</a>"; if (!n->ref.isEmpty()) diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 7404a4d..8b6d26c 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -1144,8 +1144,10 @@ void HtmlDocVisitor::visitPre(DocSimpleSect *s) { if (m_hide) return; forceEndParagraph(s); - m_t << "<dl" << getDirHtmlClassOfNode(getTextDirByConfig(s), "section " + s->typeString()) - << "><dt>"; + if (s->type() != DocSimpleSect::Return) + m_t << "<dl" << getDirHtmlClassOfNode(getTextDirByConfig(s), "section " + s->typeString()) << "><dt>"; + else + m_t << "<dl class=\"section " << s->typeString() << "\"><dt>"; switch(s->type()) { case DocSimpleSect::See: @@ -1831,7 +1833,8 @@ void HtmlDocVisitor::visitPre(DocXRefItem *x) bool anonymousEnum = x->file()=="@"; if (!anonymousEnum) { - m_t << "<dl class=\"" << x->key() << "\"><dt><b><a class=\"el\" href=\"" + m_t << "<dl" << getDirHtmlClassOfNode(getTextDirByConfig(x), x->key()) + << "><dt><b><a class=\"el\" href=\"" << x->relPath() << x->file() << Doxygen::htmlFileExtension << "#" << x->anchor() << "\">"; } diff --git a/src/index.cpp b/src/index.cpp index bfa4954..24c0290 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -1638,10 +1638,15 @@ static void writeAnnotatedClassList(OutputList &ol) ol.endIndexList(); } +inline bool isId1(int c) +{ + return (c<127 && c>31); // printable ASCII character +} + static QCString letterToLabel(uint startLetter) { char s[11]; // max 0x12345678 + '\0' - if (isId(startLetter)) // printable ASCII character + if (isId1(startLetter)) // printable ASCII character { s[0]=(char)startLetter; s[1]=0; diff --git a/src/languages.py b/src/languages.py index 2b02b3e..5bb65cf 100755 --- a/src/languages.py +++ b/src/languages.py @@ -1,5 +1,5 @@ # -# This file is an aid to generated the Languages rules file. +# This file is an aid to generate the Languages rules file. # usage: # python languages.py > ..\winbuild\Languages.rules # diff --git a/src/markdown.cpp b/src/markdown.cpp index 1cd06e5..d3ec3f1 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2061,7 +2061,7 @@ static int writeCodeBlock(GrowBuf &out,const char *data,int size,int refIndent) } // start searching for the end of the line start at offset \a i -// keeping track of possible blocks that need to to skipped. +// keeping track of possible blocks that need to be skipped. static void findEndOfLine(GrowBuf &out,const char *data,int size, int &pi,int&i,int &end) { diff --git a/src/scanner.l b/src/scanner.l index fd1568b..08a5e52 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -755,6 +755,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) %x CopyHereDocEnd %x RawString %x RawGString +%x CSString %x IDLAttribute %x IDLProp @@ -6235,8 +6236,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) <CSAccessorDecl>"add" { if (curlyCount==0) current->spec |= Entry::Addable; } <CSAccessorDecl>"remove" { if (curlyCount==0) current->spec |= Entry::Removable; } <CSAccessorDecl>"raise" { if (curlyCount==0) current->spec |= Entry::Raisable; } -<CSAccessorDecl>. {} +<CSAccessorDecl>"\"" { BEGIN(CSString);} +<CSAccessorDecl>"." {} <CSAccessorDecl>\n { lineCount(); } +<CSString>"\"" { BEGIN(CSAccessorDecl);} +<CSString>"//" {} /* Otherwise the rule <*>"//" will kick in */ +<CSString>"/*" {} /* Otherwise the rule <*>"/*" will kick in */ +<CSString>\n { lineCount(); } +<CSString>"." {} @@ -6611,6 +6618,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) BEGIN(SkipString); } } +<*>\? { + if (insideCS) + { + if (current->type.isEmpty()) + { + if (current->name.isEmpty()) + current->name="?"; + else + current->name+="?"; + } + else + { + current->type+="?"; + } + } + } <*>. <SkipComment>"//"|"/*" <*>"/*" { lastCContext = YY_START ; diff --git a/src/searchindex.cpp b/src/searchindex.cpp index 6fb2432..6276eae 100644 --- a/src/searchindex.cpp +++ b/src/searchindex.cpp @@ -1180,6 +1180,7 @@ void writeJavascriptSearchIndex() SearchIndexList *sl; for (it.toFirst();(sl=it.current());++it) // for each letter { + if ( sl->letter() == '"' ) t << QString( QChar( '\\' ) ).utf8(); t << QString( QChar( sl->letter() ) ).utf8(); } t << "\""; diff --git a/src/template.h b/src/template.h index 98ae7ed..4602c53 100644 --- a/src/template.h +++ b/src/template.h @@ -368,7 +368,7 @@ class TemplateListIntf /** Increase object's reference count */ virtual int addRef() = 0; - /** Decreases object's referenc count, destroy object if 0 */ + /** Decreases object's reference count, destroy object if 0 */ virtual int release() = 0; }; @@ -417,7 +417,7 @@ class TemplateStructIntf /** Increase object's reference count */ virtual int addRef() = 0; - /** Decreases object's referenc count, destroy object if 0 */ + /** Decreases object's reference count, destroy object if 0 */ virtual int release() = 0; }; diff --git a/src/translator_cn.h b/src/translator_cn.h index d37da94..fc0cf3c 100644 --- a/src/translator_cn.h +++ b/src/translator_cn.h @@ -100,7 +100,7 @@ class TranslatorChinese : public Translator virtual QCString trMore() { return "更多..."; } - /*! put in the class documention */ + /*! put in the class documentation */ virtual QCString trListOfAllMembers() { return "所有成员列表"; } diff --git a/src/util.cpp b/src/util.cpp index 8e936b5..9100706 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1856,7 +1856,11 @@ QCString removeRedundantWhiteSpace(const QCString &s) case '&': if (i>0 && isId(pc)) { - *dst++=' '; + if (nc != '=') + // avoid splitting operator&= + { + *dst++=' '; + } } *dst++=c; break; @@ -4191,7 +4195,7 @@ bool getDefs(const QCString &scName, //} } } - //printf(" >Succes=%d\n",mdist<maxInheritanceDepth); + //printf(" >Success=%d\n",mdist<maxInheritanceDepth); if (mdist<maxInheritanceDepth) { if (!md->isLinkable() || md->isStrongEnumValue()) diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css index 3bb7316..1425dc1 100644 --- a/templates/html/doxygen.css +++ b/templates/html/doxygen.css @@ -163,10 +163,15 @@ dl.el { margin-left: -1cm; } -.fragment -{ - text-align: left; - direction:ltr; +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; } pre.fragment { @@ -183,8 +188,8 @@ pre.fragment { } div.fragment { - padding: 0px; - margin: 4px 8px 4px 2px; + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; background-color: ##FC; border: 1px solid ##CC; } @@ -1349,8 +1354,9 @@ div.toc { width: 200px; } -.PageDocRTL-title .toc { +.PageDocRTL-title div.toc { float: left !important; + text-align: right; } div.toc li { @@ -1361,6 +1367,12 @@ div.toc li { padding-top: 2px; } +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: ##60; @@ -1390,6 +1402,26 @@ div.toc li.level4 { margin-left: 45px; } +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + .inherit_header { font-weight: bold; color: gray; |