diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-07-28 20:14:48 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-07-28 20:14:48 (GMT) |
commit | adac91e9a353095c3bae4b580d27b7cfd8617493 (patch) | |
tree | eb4c65d3676c6ecd00dc532bcb6420f9eb71aa32 | |
parent | b860a5cc743f3297002876b58d4db5e504f4294d (diff) | |
download | Doxygen-adac91e9a353095c3bae4b580d27b7cfd8617493.zip Doxygen-adac91e9a353095c3bae4b580d27b7cfd8617493.tar.gz Doxygen-adac91e9a353095c3bae4b580d27b7cfd8617493.tar.bz2 |
Release-1.2.17-20020728
41 files changed, 351 insertions, 125 deletions
@@ -3,4 +3,4 @@ DOXYGEN Version 1.2.17 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (15 July 2002) +Dimitri van Heesch (28 July 2002) @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (15 July 2002) +Dimitri van Heesch (dimitri@stack.nl) (28 July 2002) diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 58580b2..84f9f08 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -309,12 +309,13 @@ void Wizard::refreshCaption() void Wizard::about() { - QMessageBox::about(this, "DoxyWizard", - "<qt><center>A tool to create and edit configuration files " - "that can be read by doxygen.</center><p>" - "<center>Written by Dimitri van Heesch</center><p>" - "<center>(c) 2000-2002</center></qt>" - ); + QCString text(4096); + text.sprintf( "<qt><center>A tool to create and edit configuration files " + "that can be read by doxygen version %s.</center><p>" + "<center>Written by Dimitri van Heesch</center><p>" + "<center>(c) 2000-2002</center></qt>",versionString + ); + QMessageBox::about(this, "DoxyWizard",text); } //---------------------------------------------------------------------- diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp index 43d994d..33ecf2f 100644 --- a/addon/doxywizard/inputbool.cpp +++ b/addon/doxywizard/inputbool.cpp @@ -15,23 +15,31 @@ #include "inputbool.h" #include "pagewidget.h" #include <qwindowsstyle.h> +#include <qlayout.h> InputBool::InputBool( const QString & text, PageWidget * parent, bool &flag ) - : QCheckBox( text, parent->getLayout() ), state(flag) + : /*QCheckBox( text, parent->getLayout() )*/ QWidget(parent->getLayout()), state(flag) { + QBoxLayout *layout = new QHBoxLayout(this); + cb = new QCheckBox(text,this); + layout->addWidget(cb); + layout->addStretch(10); + QWindowsStyle *winStyle = new QWindowsStyle(); - setChecked( flag ); - setStyle( winStyle ); - setMinimumSize( sizeHint() ); + cb->setChecked( flag ); + cb->setStyle( winStyle ); + cb->setMinimumSize( sizeHint() ); - connect( this, SIGNAL(toggled(bool)), SLOT(setState(bool)) ); + connect( cb, SIGNAL(toggled(bool)), SLOT(setState(bool)) ); parent->addWidget(this); + + layout->activate(); } void InputBool::init() { - setChecked(state); + cb->setChecked(state); } void InputBool::setState( bool s ) @@ -39,7 +47,7 @@ void InputBool::setState( bool s ) if (state!=s) { emit changed(); - emit toggle(text(),s); + emit toggle(cb->text(),s); } state=s; } diff --git a/addon/doxywizard/inputbool.h b/addon/doxywizard/inputbool.h index ab9728f..ca4520c 100644 --- a/addon/doxywizard/inputbool.h +++ b/addon/doxywizard/inputbool.h @@ -15,13 +15,14 @@ #ifndef _INPUTBOOL_H #define _INPUTBOOL_H +#include <qwidget.h> #include <qcheckbox.h> #include "input.h" class PageWidget; -class InputBool : public QCheckBox, public IInput +class InputBool : public QWidget, /*QCheckBox,*/ public IInput { Q_OBJECT @@ -29,7 +30,7 @@ class InputBool : public QCheckBox, public IInput InputBool( const QString &text, PageWidget *parent, bool &flag ); ~InputBool(){}; void init(); - void setEnabled(bool b) { QCheckBox::setEnabled(b); } + void setEnabled(bool b) { cb->setEnabled(b); } QObject *qobject() { return this; } bool getState() const { return state; } @@ -42,6 +43,7 @@ class InputBool : public QCheckBox, public IInput private: bool &state; + QCheckBox *cb; }; diff --git a/doc/config.doc b/doc/config.doc index e469b57..a4a48a5 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -711,7 +711,7 @@ followed by the descriptions of the tags grouped by category. functions referencing it will be listed. \anchor cfg_references_relation -<dt>\c REFERENCE_RELATION <dd> +<dt>\c REFERENCES_RELATION <dd> \addindex REFERENCES_RELATION If the \c REFERENCES_RELATION tag is set to \c YES (the default) then for each documented function all documented entities diff --git a/doc/index.doc b/doc/index.doc index d4b492a..a9fad12 100644 --- a/doc/index.doc +++ b/doc/index.doc @@ -179,8 +179,8 @@ Thanks go to: <li>Petr Prikryl for coordinating the internationalisation support. All language maintainers for providing translations into many languages. <li>Erik Jan Lingen of <a href="http://www.habanera.nl/">Habanera</a>, Mark - Roddy, Paul Schwartz, Charles Duffy, Vadym Voznyuk, and Philip Walton - for donating money. + Roddy, Paul Schwartz, Charles Duffy, Vadym Voznyuk, Philip Walton and + Dwight Browne for donating money. <li>The Comms group of <a href="http://www.symbian.com">Symbian</a> for donating an ultra cool <a href="http://www.psion.com/revoplus>Revo plus</a> organizer! diff --git a/doc/install.doc b/doc/install.doc index 4b3b047..0cd453e 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -354,6 +354,13 @@ On some platforms (such as OpenBSD) using some versions of gcc with such as config.cpp. As a workaround use --debug as a configure option or omit the -O2 for the particular files in the Makefile. +<b>Dot problems</b> + +Due to a change in the way image maps are generated, older versions +of doxygen (<=1.2.17) will not work correctly with newer versions of +graphviz (>=1.8.8). The effect of this incompatibility is that +generated graphs in HTML are not properly clickable. + \subsection install_src_windows Compiling from source on Windows Currently, I have only compiled doxygen for Windows using Microsoft's diff --git a/doc/language.doc b/doc/language.doc index 5433748..0594241 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means that the text fragments that doxygen generates can be produced in languages other than English (the default) at configuration time. -Currently (version 1.2.16-20020707), 27 languages +Currently (version 1.2.14-20020317), 27 languages are supported (sorted alphabetically): Brazilian Portuguese, Chinese, Chinese Traditional, Croatian, Czech, Danish, Dutch, English, Finnish, French, @@ -55,7 +55,7 @@ when the translator was updated. <TD>Brazilian Portuguese</TD> <TD>Fabio "FJTC" Jun Takada Chino</TD> <TD>chino@NOSPAM.icmc.sc.usp.br</TD> - <TD>up-to-date</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Chinese</TD> @@ -73,13 +73,13 @@ when the translator was updated. <TD>Croatian</TD> <TD>Boris Bralo</TD> <TD>boris.bralo@NOSPAM.zg.tel.hr</TD> - <TD>up-to-date</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Czech</TD> <TD>Petr Přikryl</TD> <TD>prikrylp@NOSPAM.skil.cz</TD> - <TD>up-to-date</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Danish</TD> @@ -109,13 +109,13 @@ when the translator was updated. <TD>French</TD> <TD>Xavier Outhier</TD> <TD>xouthier@NOSPAM.yahoo.fr</TD> - <TD>up-to-date</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>German</TD> <TD>Jens Seidel<br>Jens Breitenstein</TD> <TD>jensseidel@NOSPAM.users.sf.net<br>Jens.Breitenstein@NOSPAM.tlc.de</TD> - <TD>1.2.16</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Greek</TD> @@ -133,13 +133,13 @@ when the translator was updated. <TD>Italian</TD> <TD>Alessandro Falappa<br>Ahmed Aldo Faisal</TD> <TD>alessandro@NOSPAM.falappa.net<br>aaf23@NOSPAM.cam.ac.uk</TD> - <TD>up-to-date</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Japanese</TD> <TD>Ryunosuke Sato<br>Kenji Nagamatsu</TD> <TD>puyo@NOSPAM.mint.freemail.ne.jp<br>naga@NOSPAM.joyful.club.ne.jp</TD> - <TD>up-to-date</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Korean</TD> @@ -163,7 +163,7 @@ when the translator was updated. <TD>Portuguese</TD> <TD>Rui Godinho Lopes</TD> <TD>ruiglopes@NOSPAM.yahoo.com</TD> - <TD>up-to-date</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Romanian</TD> @@ -175,7 +175,7 @@ when the translator was updated. <TD>Russian</TD> <TD>Alexandr Chelpanov</TD> <TD>cav@NOSPAM.cryptopro.ru</TD> - <TD>up-to-date</TD> + <TD>1.2.17</TD> </TR> <TR BGCOLOR="#ffffff"> <TD>Serbian</TD> @@ -224,16 +224,16 @@ when the translator was updated. {\bf Language} & {\bf Maintainer} & {\bf Contact address} & {\bf Status} \\ \hline \hline - Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt chino@icmc.sc.usp.br} & up-to-date \\ + Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt chino@icmc.sc.usp.br} & 1.2.17 \\ \hline Chinese & Wei Liu & {\tt liuwei@asiainfo.com} & 1.2.13 \\ & Wang Weihan & {\tt wangweihan@capinfo.com.cn} & \\ \hline Chinese Traditional & Gary Lee & {\tt garylee@ecosine.com.tw} & 1.2.16 \\ \hline - Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\ + Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & 1.2.17 \\ \hline - Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & up-to-date \\ + Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & 1.2.17 \\ \hline Danish & Erik S\o{}e S\o{}rensen & {\tt erik@mail.nu} & 1.2.7 \\ \hline @@ -243,19 +243,19 @@ when the translator was updated. \hline Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & obsolete \\ \hline - French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\ + French & Xavier Outhier & {\tt xouthier@yahoo.fr} & 1.2.17 \\ \hline - German & Jens Seidel & {\tt jensseidel@users.sf.net} & 1.2.16 \\ + German & Jens Seidel & {\tt jensseidel@users.sf.net} & 1.2.17 \\ & Jens Breitenstein & {\tt Jens.Breitenstein@tlc.de} & \\ \hline Greek & Harry Kalogirou & {\tt harkal@rainbow.cs.unipi.gr} & 1.2.11 \\ \hline Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\ \hline - Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & up-to-date \\ + Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & 1.2.17 \\ & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & \\ \hline - Japanese & Ryunosuke Sato & {\tt puyo@mint.freemail.ne.jp} & up-to-date \\ + Japanese & Ryunosuke Sato & {\tt puyo@mint.freemail.ne.jp} & 1.2.17 \\ & Kenji Nagamatsu & {\tt naga@joyful.club.ne.jp} & \\ \hline Korean & Richard Kim & {\tt ryk@dspwiz.com} & 1.2.13 \\ @@ -265,11 +265,11 @@ when the translator was updated. Polish & Piotr Kaminski & {\tt Piotr.Kaminski@ctm.gdynia.pl} & 1.2.16 \\ & Grzegorz Kowal & {\tt g\_kowal@poczta.onet.pl} & \\ \hline - Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & up-to-date \\ + Portuguese & Rui Godinho Lopes & {\tt ruiglopes@yahoo.com} & 1.2.17 \\ \hline Romanian & Alexandru Iosup & {\tt aiosup@yahoo.com} & 1.2.16 \\ \hline - Russian & Alexandr Chelpanov & {\tt cav@cryptopro.ru} & up-to-date \\ + Russian & Alexandr Chelpanov & {\tt cav@cryptopro.ru} & 1.2.17 \\ \hline Serbian & Dejan Milosavljevic & {\tt dmilos@email.com} & 1.2.16 \\ \hline diff --git a/doc/starting.doc b/doc/starting.doc index 1c483e5..8d4bc16 100644 --- a/doc/starting.doc +++ b/doc/starting.doc @@ -185,7 +185,7 @@ basically two options: about structural commands. </ol> Files can only be documented using the second option, since there is -no way to but a documentation block before a file. Of course, file members +no way to put a documentation block before a file. Of course, file members (functions, variable, typedefs, defines) do not need an explicit structural command; just putting a special documentation block in front or behind them will do. diff --git a/src/classdef.cpp b/src/classdef.cpp index 0185d47..8393aed 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -750,7 +750,7 @@ void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput, void ClassDef::writeDocumentation(OutputList &ol) { // write title - QCString pageTitle=name().copy(); + QCString pageTitle=displayName().copy(); QCString pageType; QCString cType=compoundTypeString(); toupper(cType.at(0)); diff --git a/src/commentcnv.l b/src/commentcnv.l index bba1b21..b0fed8d 100644 --- a/src/commentcnv.l +++ b/src/commentcnv.l @@ -109,7 +109,7 @@ static int yyread(char *buf,int max_size) copyToOutput(yytext+i,yyleng-i); BEGIN(SComment); } -<Scan>"//"[\/!].*\n { /* one line C++ comment */ +<Scan>"//".*\n { /* one line C++ comment */ copyToOutput(yytext,yyleng); } <Scan>"/*" { /* start of a C comment */ diff --git a/src/config.l b/src/config.l index 8c3c50b..7c8865c 100644 --- a/src/config.l +++ b/src/config.l @@ -1557,6 +1557,13 @@ void Config::create() "commands in the documentation.\n", TRUE ); + cb = addBool( + "GENERATE_DEPRECATEDLIST", + "The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or \n" + "disable (NO) the deprecated list. This list is created by putting " + "\\deprecated commands in the documentation.\n", + TRUE + ); cl = addList( "ALIASES", "This tag can be used to specify a number of aliases that acts \n" @@ -1732,7 +1739,7 @@ void Config::create() "FILTER_SOURCE_FILES", "If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using \n" "INPUT_FILTER) will be used to filter the input files when producing source \n" - "files to browse. \n", + "files to browse (i.e. when SOURCE_BROWSER is set to YES). \n", FALSE ); //----------------------------------------------------------------------------------------------- diff --git a/src/definition.cpp b/src/definition.cpp index 4dafb51..dcdaa72 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -50,6 +50,7 @@ Definition::Definition(const char *df,int dl, m_todoId=0; m_testId=0; m_bugId=0; + m_deprecatedId=0; m_outerScope=Doxygen::globalScope; m_partOfGroups=0; m_specialListItems=0; diff --git a/src/definition.h b/src/definition.h index ad3da97..88c9628 100644 --- a/src/definition.h +++ b/src/definition.h @@ -161,9 +161,10 @@ class Definition SectionDict *m_sectionDict; // dictionary of all sections MemberSDict *m_sourceRefByDict; MemberSDict *m_sourceRefsDict; - int m_testId; // id for test list item - int m_todoId; // id for todo list item - int m_bugId; // id for bug list item + int m_testId; // id for test list item + int m_todoId; // id for todo list item + int m_bugId; // id for bug list item + int m_deprecatedId; // id for deprecated list item int m_docLine; QCString m_docFile; int m_briefLine; @@ -1692,9 +1692,11 @@ LINKMASK [a-z_A-Z0-9:#.,~&*/\[\]<>()\-\+]+({B}*("const"|"volatile"))? } <DocScan>"\\todo "[0-9]+ | /* generated labels */ <DocScan>"\\test "[0-9]+ | -<DocScan>"\\bug "[0-9]+ { +<DocScan>"\\bug "[0-9]+ | +<DocScan>"\\deprecated "[0-9]+ { writeSpecialItem(yytext); } + /* <DocScan>{CMD}"deprecated"{BSEP} { if (insideItemList) { @@ -1713,7 +1715,8 @@ LINKMASK [a-z_A-Z0-9:#.,~&*/\[\]<>()\-\+]+({B}*("const"|"volatile"))? { outDoc->writeDescItem(); } - } + } + */ <DocScan>"$"[a-zA-Z_0-9]+":"[^\n\$]+"$" { // RCS tag QCString tagName(&yytext[1]); int i=tagName.find(':'); diff --git a/src/dot.cpp b/src/dot.cpp index a5ad72b..2e9ca54 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -75,7 +75,24 @@ static bool convertMapFile(QTextStream &t,const char *mapName) //printf("ReadLine `%s'\n",buf); if (strncmp(buf,"rect",4)==0) { + // obtain the url and the coordinates in the order used by graphviz-1.5 sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y2,&x2,&y1); + // later versions of graphviz corrected the y coordinate order + // the rule is that y2>=y1, so test and switch if needed + if (y2<y1) + { + int temp=y2; + y2=y1; + y1=temp; + } + // there shouldn't be any need for this for known versions of graphviz + // but it can't do any harm to check that x follows the rules as well + if (x2<x1) + { + int temp=x2; + x2=x1; + x1=temp; + } char *refPtr = url; char *urlPtr = strchr(url,'$'); //printf("url=`%s'\n",url); @@ -230,7 +247,7 @@ class DotNodeList : public QList<DotNode> /*! helper function that deletes all nodes in a connected graph, given * one of the graph's nodes */ -static void deleteNodes(DotNode *node,SIntDict<DotNode> *skipNodes=0) +static void deleteNodes(DotNode *node,SDict<DotNode> *skipNodes=0) { //printf("deleteNodes skipNodes=%p\n",skipNodes); static DotNodeList deletedNodes; @@ -311,7 +328,7 @@ void DotNode::removeParent(DotNode *n) if (m_parents) m_parents->remove(n); } -void DotNode::deleteNode(DotNodeList &deletedList,SIntDict<DotNode> *skipNodes) +void DotNode::deleteNode(DotNodeList &deletedList,SDict<DotNode> *skipNodes) { if (m_deleted) return; // avoid recursive loops in case the graph has cycles m_deleted=TRUE; @@ -337,7 +354,7 @@ void DotNode::deleteNode(DotNodeList &deletedList,SIntDict<DotNode> *skipNodes) } // add this node to the list of deleted nodes. //printf("skipNodes=%p find(%p)=%p\n",skipNodes,this,skipNodes ? skipNodes->find((int)this) : 0); - if (skipNodes==0 || skipNodes->find((int)this)==0) + if (skipNodes==0 || skipNodes->find((char*)this)==0) { //printf("deleting\n"); deletedList.append(this); @@ -933,13 +950,13 @@ DotGfxHierarchyTable::DotGfxHierarchyTable() DotGfxHierarchyTable::~DotGfxHierarchyTable() { //printf("DotGfxHierarchyTable::~DotGfxHierarchyTable\n"); - SIntDict<DotNode> skipNodes(17); + SDict<DotNode> skipNodes(17); skipNodes.setAutoDelete(TRUE); DotNode *n = m_rootNodes->first(); while (n) { //printf("adding %s %p\n",n->label().data(),n); - skipNodes.append((int)n,n); + skipNodes.append((char*)n,n); n=m_rootNodes->next(); } n = m_rootNodes->first(); @@ -69,7 +69,7 @@ class DotNode ); void setDistance(int distance); void addParent(DotNode *n); - void deleteNode(DotNodeList &deletedList,SIntDict<DotNode> *skipNodes=0); + void deleteNode(DotNodeList &deletedList,SDict<DotNode> *skipNodes=0); void removeChild(DotNode *n); void removeParent(DotNode *n); void write(QTextStream &t,GraphOutputFormat f,bool topDown,bool toChildren, diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 36c86c3..388a323 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -2541,6 +2541,107 @@ static QDict<int> *getTemplateArgumentsInName(ArgumentList *templateArguments,co return templateNames; } +/*! Searches a class from within the context of \a cd and returns its + * definition if found (otherwise 0 is returned). + * This function differs from getResolvedClass in that it also takes + * using declarations and definition into account. + */ +ClassDef *findClassWithinClassContext(ClassDef *cd,const QCString &name) +{ + ClassDef *result=0; + + // try using of namespaces in namespace scope + NamespaceDef *nd=cd->getNamespaceDef(); + FileDef *fd=cd->getFileDef(); + if (nd) // class is inside a namespace + { + QCString fName = nd->name()+"::"+name; + result = getResolvedClass(cd,fName); + if (result && result!=cd) + { + return result; + } + NamespaceList *nl = nd->getUsedNamespaces(); + if (nl) // try to prepend any of the using namespace scopes. + { + NamespaceListIterator nli(*nl); + NamespaceDef *nd; + for (nli.toFirst() ; (nd=nli.current()) ; ++nli) + { + fName = nd->name()+"::"+name; + result = getResolvedClass(cd,fName); + if (result && result!=cd) return result; + } + } + ClassList *cl = nd->getUsedClasses(); + if (cl) + { + ClassListIterator cli(*cl); + ClassDef *ucd; + for (cli.toFirst(); (ucd=cli.current()) ; ++cli) + { + if (rightScopeMatch(ucd->name(),name)) + { + return ucd; + } + } + } + // TODO: check any inbetween namespaces as well! + if (fd) // and in the global namespace + { + ClassList *cl = fd->getUsedClasses(); + if (cl) + { + ClassListIterator cli(*cl); + ClassDef *ucd; + for (cli.toFirst(); (ucd=cli.current()); ++cli) + { + if (rightScopeMatch(ucd->name(),name)) + { + return ucd; + } + } + } + } + } + + // try using of namespaces in file scope + if (fd) + { + // look for the using statement in this file in which the + // class was found + NamespaceList *nl = fd->getUsedNamespaces(); + if (nl) // try to prepend any of the using namespace scopes. + { + NamespaceListIterator nli(*nl); + NamespaceDef *nd; + for (nli.toFirst() ; (nd=nli.current()) ; ++nli) + { + QCString fName = nd->name()+"::"+name; + result=getResolvedClass(cd,fName); + if (result && result!=cd) + { + return result; + } + } + } + ClassList *cl = fd->getUsedClasses(); + if (cl) + { + ClassListIterator cli(*cl); + ClassDef *ucd; + for (cli.toFirst(); (ucd=cli.current()) ; ++cli) + { + if (rightScopeMatch(ucd->name(),name)) + { + return ucd; + } + } + } + } + + return getResolvedClass(cd,name); +} enum FindBaseClassRelation_Mode { @@ -2586,6 +2687,7 @@ static void findUsedClassesForClass(Entry *root, QCString usedClassName; QCString templSpec; bool found=FALSE; + // the type can contain template variables, replace them if present if (actualArgs) { type = substituteTemplateArgumentsInString(type,formalArgs,actualArgs); @@ -2593,12 +2695,17 @@ static void findUsedClassesForClass(Entry *root, //printf("findUsedClassesForClass(%s)=%s\n",masterCd->name().data(),type.data()); while (!found && extractClassNameFromType(type,pos,usedClassName,templSpec)) { + // the name could be a type definition, resolve it + // TODO: recursive typedef resolution QCString typeName = resolveTypeDef(masterCd,usedClassName); + + // add any template arguments to the class QCString usedName = usedClassName+templSpec; - if (!typeName.isEmpty()) - { - usedName=typeName; - } + + //if (!typeName.isEmpty()) + //{ + // usedName=typeName; + //} //printf("usedName=`%s'\n",usedName.data()); bool delTempNames=FALSE; @@ -2642,11 +2749,16 @@ static void findUsedClassesForClass(Entry *root, if (!found) { - Definition *scope=masterCd->getOuterScope(); ClassDef *usedCd=0; +#if 0 + Definition *scope=masterCd->getOuterScope(); do { - QCString scopeName = scope ? scope->qualifiedName().data() : 0; + // TODO: also consider using declarations and directives + // as done for inheritance relations. + + QCString scopeName; + if (scope) scopeName=scope->qualifiedName(); if (!scopeName.isEmpty()) { usedCd=getResolvedClass(masterCd,scopeName+"::"+usedName,0,&templSpec); @@ -2661,8 +2773,10 @@ static void findUsedClassesForClass(Entry *root, } if (scope) scope=scope->getOuterScope(); } while (scope && usedCd==0); +#endif + usedCd = findClassWithinClassContext(masterCd,usedName); - if (usedCd) + if (usedCd && usedCd!=masterCd) { found=TRUE; Debug::print(Debug::Classes,0," Adding used class `%s'\n", usedCd->name().data()); @@ -2944,7 +3058,6 @@ static bool findClassRelation( //printf("cd=%p baseClass=%p\n",cd,baseClass); bool found=baseClass!=0 && (baseClass!=cd || mode==TemplateInstances); - NamespaceDef *nd=cd->getNamespaceDef(); if (!found && (i=baseClassName.findRev("::"))!=-1) { // replace any namespace aliases @@ -2953,9 +3066,19 @@ static bool findClassRelation( found=baseClass!=0 && baseClass!=cd; } - FileDef *fd=cd->getFileDef(); + //printf("root->name=%s biName=%s baseClassName=%s\n", + // root->name.data(),biName.data(),baseClassName.data()); + + //FileDef *fd=cd->getFileDef(); + //NamespaceDef *nd=cd->getNamespaceDef(); if (!found) { + baseClass=findClassWithinClassContext(cd,baseClassName); + //printf("findClassWithinClassContext(%s,%s)=%p\n", + // cd->name().data(),baseClassName.data(),baseClass); + found = baseClass!=0 && baseClass!=cd; + +#if 0 if (fd) { // look for the using statement in this file in which the @@ -2968,7 +3091,8 @@ static bool findClassRelation( for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli) { QCString fName = nd->name()+"::"+baseClassName; - found = (baseClass=getResolvedClass(cd,fName))!=0 && baseClass!=cd && + found = (baseClass=getResolvedClass(cd,fName))!=0 && + baseClass!=cd && root->name!=fName; } } @@ -3002,7 +3126,8 @@ static bool findClassRelation( for (nli.toFirst() ; (nd=nli.current()) && !found ; ++nli) { fName = nd->name()+"::"+baseClassName; - found = (baseClass=getResolvedClass(cd,fName))!=0 && baseClass!=cd && + found = (baseClass=getResolvedClass(cd,fName))!=0 && + baseClass!=cd && root->name!=fName; } } @@ -3042,6 +3167,7 @@ static bool findClassRelation( } } } +#endif } bool isATemplateArgument = templateNames!=0 && templateNames->find(biName)!=0; if (found) @@ -5808,11 +5934,11 @@ static void resolveUserReferences() si->fileName=si->definition->getOutputFileBase().copy(); } } - // hack: the items of a todo/test/bug list are all fragments from + // hack: the items of a todo/test/bug/deprecated list are all fragments from // different files, so the resulting section's all have the wrong file - // name (not from the todo/test/bug list, but from the file in which they - // are defined). We correct this here by looking at the generated section - // labels! + // name (not from the todo/test/bug/deprecated list, but from the file in + // which they are defined). We correct this here by looking at the + // generated section labels! QDictIterator<RefList> rli(*Doxygen::specialLists); RefList *rl; for (rli.toFirst();(rl=rli.current());++rli) @@ -7038,6 +7164,15 @@ void readConfiguration(int argc, char **argv) BaseOutputDocInterface::Bug ) ); + Doxygen::specialLists->insert("deprecated", + new RefList("deprecated", + "GENERATE_DEPRECATEDLIST", + theTranslator->trDeprecatedList(), + theTranslator->trDeprecated(), + BaseOutputDocInterface::Deprecated + ) + ); + } void parseInput() diff --git a/src/doxygen.h b/src/doxygen.h index f97c23c..72d3a80 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -93,7 +93,7 @@ class Doxygen static QIntDict<QCString> memberDocDict; // dictionary of the member groups heading static QDict<void> expandAsDefinedDict; static NamespaceDef *globalScope; - static QDict<RefList> *specialLists; // array of special lists: todo, test, bug ... + static QDict<RefList> *specialLists; // array of special lists: todo, test, bug, deprecated ... }; void initDoxygen(); diff --git a/src/entry.h b/src/entry.h index f814ef4..5b75105 100644 --- a/src/entry.h +++ b/src/entry.h @@ -283,10 +283,7 @@ class Entry QList<QCString> *anchors; //!< list of anchors defined in this entry QCString fileName; //!< file this entry was extracted from int startLine; //!< start line of entry in the source - //int todoId; //!< id of the todo list item of this entry - //int testId; //!< id of the test list item of this entry - //int bugId; //!< id of the bug list item of this entry - QList<ListItemInfo> *sli; //!< special lists (test/todo/bug/..) this entry is in + QList<ListItemInfo> *sli; //!< special lists (test/todo/bug/deprecated/..) this entry is in TagInfo *tagInfo; //!< tag file info static int num; //!< counts the total number of entries enum diff --git a/src/index.cpp b/src/index.cpp index cd93267..2754080 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -1382,17 +1382,9 @@ void writeAlphabeticalClassList(OutputList &ol) } else if (cd) // a real class, insert a link { - QCString cname; QCString namesp; - if (cd->getNamespaceDef()) namesp=cd->getNamespaceDef()->name(); - if (Config_getBool("HIDE_SCOPE_NAMES")) - { - cname=cd->displayName(); - } - else - { - cname=cd->className(); - } + if (cd->getNamespaceDef()) namesp=cd->getNamespaceDef()->displayName(); + QCString cname=cd->displayName(); ol.writeObjectLink(cd->getReference(), cd->getOutputFileBase(),0,cname); diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 3794af1..9bb5f17 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -37,6 +37,7 @@ MemberGroup::MemberGroup(int id,const char *hdr,const char *d) /* : Definition(idToName(id)) */ { + //printf("New member group id=%d header=%s desc=%s\n",id,hdr,d); memberList = new MemberList; grpId = id; grpHeader = hdr; diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index 34f9f7d..f24de91 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -220,7 +220,7 @@ void NamespaceDef::writeDetailedDocumentation(OutputList &ol) void NamespaceDef::writeDocumentation(OutputList &ol) { - QCString pageTitle=name()+" Namespace Reference"; + QCString pageTitle=displayName()+" Namespace Reference"; startFile(ol,getOutputFileBase(),name(),pageTitle); startTitle(ol,getOutputFileBase()); //ol.docify(pageTitle); diff --git a/src/reflist.cpp b/src/reflist.cpp index 9d23e04..7d49575 100644 --- a/src/reflist.cpp +++ b/src/reflist.cpp @@ -18,15 +18,6 @@ #include "reflist.h" -#if 0 -/*! The one and only todo list */ -RefList todoList; -/*! The test criteria list */ -RefList testList; -/*! The bug list */ -RefList bugList; -#endif - /*! Create a list of items that are cross referenced with documentation blocks * @param listName String representing the name of the list. * @param optionName String representation of the option enabling the list. diff --git a/src/scanner.l b/src/scanner.l index 095c1cd..468e1ad 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -88,10 +88,6 @@ static int squareCount = 0 ; static int padCount = 0 ; static int slStartContext = 0; static QCString slString; -//static int testStartContext = 0; -//static QCString testString; -//static int bugStartContext = 0; -//static QCString bugString; static Entry* current_root = 0 ; static Entry* global_root = 0 ; static Entry* current = 0 ; @@ -616,6 +612,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x TodoParam %x TestParam %x BugParam +%x DeprecatedParam %x SectionLabel %x SectionTitle %x SkipTemplate @@ -1499,6 +1496,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) warn(yyFileName,yyLineNr, "Warning: end of group without matching begin."); } + //printf("end of member group marker ends group %d\n",memberGroupId); endGroup(); memberGroupHeader.resize(0); } @@ -3214,10 +3212,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } <SkipHtmlComment>"--"[!]?">" { BEGIN(lastSkipHtmlCommentContext); } <SkipHtmlComment>. -<AfterDoc,Doc,ClassDoc,PageDoc>("\\\\"|"@@")("todo"|"test"|"bug")/[^a-z_A-Z0-9] { +<AfterDoc,Doc,ClassDoc,PageDoc>("\\\\"|"@@")("todo"|"test"|"bug"|"deprecated")/[^a-z_A-Z0-9] { current->doc+=yytext; } -<AfterDocLine,LineDoc,JavaDoc>("\\\\"|"@@")("todo"|"test"|"bug")/[^a-z_A-Z0-9] { +<AfterDocLine,LineDoc,JavaDoc>("\\\\"|"@@")("todo"|"test"|"bug"|"deprecated")/[^a-z_A-Z0-9] { current->brief+=yytext; } <AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"todo"/[^a-z_A-Z0-9] { @@ -3241,6 +3239,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) current->brief.resize(0); BEGIN(ClassDocBrief); } +<AfterDoc,AfterDocLine,LineDoc,Doc,JavaDoc,ClassDoc,PageDoc>{CMD}"deprecated"/[^a-z_A-Z0-9] { + slStartContext = YY_START; + lastBriefContext = DeprecatedParam; // this is where we will continue at the end of the argument + slString = current->brief.copy(); // these will be swapped later on. + current->brief.resize(0); + BEGIN(ClassDocBrief); + } <TodoParam>\n | <TodoParam>"//" | <TodoParam>"/*" | @@ -3265,6 +3270,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); BEGIN(slStartContext); } +<DeprecatedParam>\n | +<DeprecatedParam>"//" | +<DeprecatedParam>"/*" | +<DeprecatedParam>. { + addSpecialItem("deprecated"); + int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]); + BEGIN(slStartContext); + } <ExampleDocArg1>{FILE} { current->name = stripQuotes(yytext); BEGIN( ExampleDoc ); @@ -3457,6 +3470,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) memberGroupDocs+="\n\n"; } memberGroupDocs+=current->doc; + Doxygen::memberDocDict.insert(memberGroupId, + new QCString(memberGroupDocs) + ); current->doc.resize(0); current->brief.resize(0); BEGIN(lastDocContext); @@ -3618,6 +3634,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) warn(yyFileName,yyLineNr, "Warning: end of group without matching begin."); } + //printf("end of member group marker ends group %d\n",memberGroupId); endGroup(); memberGroupHeader.resize(0); } @@ -4295,12 +4312,13 @@ static void startGroup() } else { - if (memberGroupId!=NOGROUP) - { - //warn(yyFileName,yyLineNr,"Warning: ignoring nested member group. " - // "Previous command was found at line %d.",lastMemberGroupLine); - endGroup(); - } + //if (memberGroupId!=NOGROUP) + //{ + // //warn(yyFileName,yyLineNr,"Warning: ignoring nested member group. " + // // "Previous command was found at line %d.",lastMemberGroupLine); + // printf("startGroup ends group %d\n",memberGroupId); + // endGroup(); + //} if (memberGroupHeader.isEmpty()) { // warn( yyFileName, yyLineNr, "Warning: member group does not have a header" ); @@ -4327,10 +4345,11 @@ static void startGroupInDoc() } else if (current->section == Entry::MEMBERGRP_SEC) /* scope for a member group: @name */ { - if (memberGroupId!=NOGROUP) - { - endGroup(); - } + //if (memberGroupId!=NOGROUP) + //{ + // printf("startGroupInDoc ends group %d\n",memberGroupId); + // endGroup(); + //} memberGroupId = newMemberGroupId(); Doxygen::memberHeaderDict.insert(memberGroupId, new QCString(memberGroupHeader.stripWhiteSpace()) @@ -4378,7 +4397,11 @@ static void endGroup() static void forceEndGroup() { - while (memberGroupId!=NOGROUP || !autoGroupStack.isEmpty()) endGroup(); + while (memberGroupId!=NOGROUP || !autoGroupStack.isEmpty()) + { + //printf("forceEndGroup ends group %d\n",memberGroupId); + endGroup(); + } } //---------------------------------------------------------------------------- diff --git a/src/translator.h b/src/translator.h index 093f4ad..736b140 100644 --- a/src/translator.h +++ b/src/translator.h @@ -376,6 +376,12 @@ class Translator ////////////////////////////////////////////////////////////////////////// virtual QCString trRTFTableOfContents() = 0; + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + virtual QCString trDeprecatedList() = 0; }; diff --git a/src/translator_adapter.h b/src/translator_adapter.h index 5ef3094..59eefe8 100644 --- a/src/translator_adapter.h +++ b/src/translator_adapter.h @@ -40,7 +40,17 @@ class TranslatorAdapterBase : public Translator }; -class TranslatorAdapter_1_2_16 : public TranslatorAdapterBase +class TranslatorAdapter_1_2_17 : public TranslatorAdapterBase +{ + public: + virtual QCString updateNeededMessage() + { return createUpdateNeededMessage(idLanguage(),"release 1.2.17"); } + + virtual QCString trDeprecatedList() + { return english.trDeprecatedList(); } +}; + +class TranslatorAdapter_1_2_16 : public TranslatorAdapter_1_2_17 { public: virtual QCString updateNeededMessage() diff --git a/src/translator_br.h b/src/translator_br.h index ad51e49..e361f6b 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -25,7 +25,7 @@ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian: public Translator +class TranslatorBrazilian: public TranslatorAdapter_1_2_17 { public: diff --git a/src/translator_cz.h b/src/translator_cz.h index d5b5f27..f997bda 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -160,7 +160,7 @@ // probably slightly faster. -class TranslatorCzech : public Translator +class TranslatorCzech : public TranslatorAdapter_1_2_17 { private: /*! The decode() inline assumes the source written in the diff --git a/src/translator_de.h b/src/translator_de.h index c818fdd..41f2d45 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -71,7 +71,7 @@ #ifndef TRANSLATOR_DE_H #define TRANSLATOR_DE_H -class TranslatorGerman : public TranslatorAdapter_1_2_16 +class TranslatorGerman : public TranslatorAdapter_1_2_17 { public: diff --git a/src/translator_en.h b/src/translator_en.h index fe88737..a670015 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -1404,6 +1404,17 @@ class TranslatorEnglish : public Translator return "Table of Contents"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Deprecated List"; + } }; #endif diff --git a/src/translator_fr.h b/src/translator_fr.h index f8ffa45..945c198 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -41,7 +41,7 @@ #ifndef TRANSLATOR_FR_H #define TRANSLATOR_FR_H -class TranslatorFrench : public Translator +class TranslatorFrench : public TranslatorAdapter_1_2_17 { public: QCString idLanguage() diff --git a/src/translator_hr.h b/src/translator_hr.h index f6081db..c53326a 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -50,7 +50,7 @@ #ifndef TRANSLATOR_HR_H #define TRANSLATOR_HR_H -class TranslatorCroatian : public Translator +class TranslatorCroatian : public TranslatorAdapter_1_2_17 { private: /*! to avoid macro redefinition from translator_cz.h */ diff --git a/src/translator_it.h b/src/translator_it.h index a24f381..9766eb9 100644 --- a/src/translator_it.h +++ b/src/translator_it.h @@ -65,7 +65,7 @@ #ifndef TRANSLATOR_IT_H #define TRANSLATOR_IT_H -class TranslatorItalian : public Translator +class TranslatorItalian : public TranslatorAdapter_1_2_17 { public: diff --git a/src/translator_jp.h b/src/translator_jp.h index 0f81f01..ab6a10a 100644 --- a/src/translator_jp.h +++ b/src/translator_jp.h @@ -61,7 +61,7 @@ class TranslatorJapaneseEn : public TranslatorEnglish } }; -class TranslatorJapanese : public Translator +class TranslatorJapanese : public TranslatorAdapter_1_2_17 { private: /*! The decode() can change euc into sjis */ diff --git a/src/translator_nl.h b/src/translator_nl.h index bc4eaca..8b8a213 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -1002,6 +1002,17 @@ class TranslatorDutch : public Translator virtual QCString trRTFTableOfContents() { return "Inhoudsopgave"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Deprecated Lijst"; + } }; #endif diff --git a/src/translator_pt.h b/src/translator_pt.h index 7ebc4fa..02d6916 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -36,7 +36,7 @@ #ifndef TRANSLATOR_PT_H #define TRANSLATOR_PT_H -class TranslatorPortuguese : public Translator +class TranslatorPortuguese : public TranslatorAdapter_1_2_17 { public: diff --git a/src/translator_ru.h b/src/translator_ru.h index dafc470..172a3e6 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -50,7 +50,7 @@ #ifndef TRANSLATOR_RU_H #define TRANSLATOR_RU_H -class TranslatorRussian : public Translator +class TranslatorRussian : public TranslatorAdapter_1_2_17 { private: /*! The Decode() inline assumes the source written in the diff --git a/src/util.cpp b/src/util.cpp index 4ca7d8e..7a48266 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -3148,7 +3148,7 @@ bool extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCStr /*! Substitutes any occurrence of a formal argument from argument list * \a formalArgs in \a name by the corresponding actual argument in * argument list \a actualArgs. The result after substitution - * is returned as a string. The argument \a className is used to + * is returned as a string. The argument \a name is used to * prevent recursive substitution. */ QCString substituteTemplateArgumentsInString( @@ -3189,7 +3189,9 @@ QCString substituteTemplateArgumentsInString( result += actArg->type; found=TRUE; } - else if (formArg->name==n && actArg==0 && !formArg->defval.isEmpty()) + else if (formArg->name==n && actArg==0 && !formArg->defval.isEmpty() && + formArg->defval!=name /* to prevent recursion */ + ) { result += substituteTemplateArgumentsInString(formArg->defval,formalArgs,actualArgs); found=TRUE; diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 567cf02..8d8f78f 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -667,7 +667,7 @@ class XMLGenerator : public OutputDocInterface // we need manually add a para here because cells are // parsed before the table is generated, and thus // are already parsed as if they are inside a paragraph. - //m_t << "<para>"; + m_t << "<para>"; } void endTableRow() { @@ -1521,7 +1521,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) { t << " id=\"" << ii->fileDef->getOutputFileBase() << "\""; } - t << " local=\"" << (ii->local ? "yes" : "no") << "\""; + t << " local=\"" << (ii->local ? "yes" : "no") << "\">"; t << nm; t << "</includes>" << endl; } |