summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2010-05-07 19:37:33 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2010-05-07 19:37:33 (GMT)
commita3b06c4fd310fdeda48a4730139cee09b5302072 (patch)
tree58636054e8f52c5851109b908053cc4da26b060a /src
parent368c93a05bf38e440dba3f033f6e2e1cbeb2f379 (diff)
downloadDoxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.zip
Doxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.tar.gz
Doxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.tar.bz2
Release-1.6.3-20100507
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp111
-rw-r--r--src/classdef.h1
-rw-r--r--src/cmdmapper.cpp2
-rw-r--r--src/code.l34
-rw-r--r--src/commentcnv.l18
-rw-r--r--src/config.xml10
-rw-r--r--src/configoptions.cpp18
-rw-r--r--src/dbusxmlscanner.cpp4
-rw-r--r--src/defgen.cpp16
-rw-r--r--src/diagram.cpp18
-rw-r--r--src/diagram.h9
-rw-r--r--src/dirdef.cpp3
-rw-r--r--src/dirdef.h4
-rw-r--r--src/docparser.cpp194
-rw-r--r--src/docparser.h353
-rw-r--r--src/docsets.cpp23
-rw-r--r--src/docsets.h9
-rw-r--r--src/doctokenizer.h16
-rw-r--r--src/doctokenizer.l22
-rw-r--r--src/dot.cpp121
-rw-r--r--src/dot.h40
-rw-r--r--src/doxygen.cpp74
-rw-r--r--src/doxygen.css24
-rw-r--r--src/doxygen_css.h24
-rw-r--r--src/eclipsehelp.cpp4
-rw-r--r--src/eclipsehelp.h4
-rw-r--r--src/filedef.cpp20
-rw-r--r--src/filedef.h1
-rw-r--r--src/formula.cpp4
-rw-r--r--src/ftextstream.cpp259
-rw-r--r--src/ftextstream.h82
-rw-r--r--src/ftvhelp.cpp242
-rw-r--r--src/ftvhelp.h13
-rw-r--r--src/groupdef.cpp22
-rw-r--r--src/groupdef.h1
-rw-r--r--src/htmlattrib.h8
-rw-r--r--src/htmldocvisitor.cpp50
-rw-r--r--src/htmldocvisitor.h17
-rw-r--r--src/htmlgen.cpp55
-rw-r--r--src/htmlgen.h3
-rw-r--r--src/index.cpp41
-rw-r--r--src/index.h4
-rw-r--r--src/instdox.cpp2
-rw-r--r--src/latexdocvisitor.cpp68
-rw-r--r--src/latexdocvisitor.h23
-rw-r--r--src/latexgen.cpp128
-rw-r--r--src/latexgen.h8
-rw-r--r--src/layout.h2
-rw-r--r--src/libdoxygen.pro.in2
-rw-r--r--src/lodepng.h2
-rw-r--r--src/mandocvisitor.cpp12
-rw-r--r--src/mandocvisitor.h7
-rw-r--r--src/mangen.cpp4
-rw-r--r--src/memberdef.cpp146
-rw-r--r--src/memberdef.h6
-rw-r--r--src/memberlist.cpp12
-rw-r--r--src/memberlist.h3
-rw-r--r--src/msc.cpp10
-rw-r--r--src/msc.h4
-rw-r--r--src/namespacedef.cpp28
-rw-r--r--src/namespacedef.h2
-rw-r--r--src/outputgen.cpp50
-rw-r--r--src/outputgen.h14
-rw-r--r--src/perlmodgen.cpp70
-rw-r--r--src/perlmodgen.h4
-rw-r--r--src/pre.l12
-rw-r--r--src/qhpxmlwriter.h6
-rw-r--r--src/rtfdocvisitor.cpp44
-rw-r--r--src/rtfdocvisitor.h19
-rw-r--r--src/rtfgen.cpp75
-rw-r--r--src/rtfgen.h2
-rw-r--r--src/scanner.l16
-rw-r--r--src/search_css.h2
-rw-r--r--src/textdocvisitor.h6
-rw-r--r--src/util.cpp500
-rw-r--r--src/util.h8
-rw-r--r--src/xmldocvisitor.cpp16
-rw-r--r--src/xmldocvisitor.h12
-rw-r--r--src/xmlgen.cpp90
79 files changed, 2031 insertions, 1362 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 2542774..bfd2fa3 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -372,40 +372,40 @@ void ClassDef::internalInsertMember(MemberDef *md,
/********************************************/
if (md->isRelated() && (extractPrivate || prot!=Private))
{
- addMemberToList(MemberList::related,md,true);
+ addMemberToList(MemberList::related,md,TRUE);
}
else if (md->isFriend())
{
- addMemberToList(MemberList::friends,md,true);
+ addMemberToList(MemberList::friends,md,TRUE);
}
else
{
switch (md->memberType())
{
case MemberDef::Signal: // Qt specific
- addMemberToList(MemberList::signals,md,true);
+ addMemberToList(MemberList::signals,md,TRUE);
break;
case MemberDef::DCOP: // KDE2 specific
- addMemberToList(MemberList::dcopMethods,md,true);
+ addMemberToList(MemberList::dcopMethods,md,TRUE);
break;
case MemberDef::Property:
- addMemberToList(MemberList::properties,md,true);
+ addMemberToList(MemberList::properties,md,TRUE);
break;
case MemberDef::Event:
- addMemberToList(MemberList::events,md,true);
+ addMemberToList(MemberList::events,md,TRUE);
break;
case MemberDef::Slot: // Qt specific
switch (prot)
{
case Protected:
case Package: // slots in packages are not possible!
- addMemberToList(MemberList::proSlots,md,true);
+ addMemberToList(MemberList::proSlots,md,TRUE);
break;
case Public:
- addMemberToList(MemberList::pubSlots,md,true);
+ addMemberToList(MemberList::pubSlots,md,TRUE);
break;
case Private:
- addMemberToList(MemberList::priSlots,md,true);
+ addMemberToList(MemberList::priSlots,md,TRUE);
break;
}
break;
@@ -417,16 +417,16 @@ void ClassDef::internalInsertMember(MemberDef *md,
switch (prot)
{
case Protected:
- addMemberToList(MemberList::proStaticAttribs,md,true);
+ addMemberToList(MemberList::proStaticAttribs,md,TRUE);
break;
case Package:
- addMemberToList(MemberList::pacStaticAttribs,md,true);
+ addMemberToList(MemberList::pacStaticAttribs,md,TRUE);
break;
case Public:
- addMemberToList(MemberList::pubStaticAttribs,md,true);
+ addMemberToList(MemberList::pubStaticAttribs,md,TRUE);
break;
case Private:
- addMemberToList(MemberList::priStaticAttribs,md,true);
+ addMemberToList(MemberList::priStaticAttribs,md,TRUE);
break;
}
}
@@ -435,16 +435,16 @@ void ClassDef::internalInsertMember(MemberDef *md,
switch (prot)
{
case Protected:
- addMemberToList(MemberList::proStaticMethods,md,true);
+ addMemberToList(MemberList::proStaticMethods,md,TRUE);
break;
case Package:
- addMemberToList(MemberList::pacStaticMethods,md,true);
+ addMemberToList(MemberList::pacStaticMethods,md,TRUE);
break;
case Public:
- addMemberToList(MemberList::pubStaticMethods,md,true);
+ addMemberToList(MemberList::pubStaticMethods,md,TRUE);
break;
case Private:
- addMemberToList(MemberList::priStaticMethods,md,true);
+ addMemberToList(MemberList::priStaticMethods,md,TRUE);
break;
}
}
@@ -456,16 +456,16 @@ void ClassDef::internalInsertMember(MemberDef *md,
switch (prot)
{
case Protected:
- addMemberToList(MemberList::proAttribs,md,true);
+ addMemberToList(MemberList::proAttribs,md,TRUE);
break;
case Package:
- addMemberToList(MemberList::pacAttribs,md,true);
+ addMemberToList(MemberList::pacAttribs,md,TRUE);
break;
case Public:
- addMemberToList(MemberList::pubAttribs,md,true);
+ addMemberToList(MemberList::pubAttribs,md,TRUE);
break;
case Private:
- addMemberToList(MemberList::priAttribs,md,true);
+ addMemberToList(MemberList::priAttribs,md,TRUE);
break;
}
}
@@ -474,16 +474,16 @@ void ClassDef::internalInsertMember(MemberDef *md,
switch (prot)
{
case Protected:
- addMemberToList(MemberList::proTypes,md,true);
+ addMemberToList(MemberList::proTypes,md,TRUE);
break;
case Package:
- addMemberToList(MemberList::pacTypes,md,true);
+ addMemberToList(MemberList::pacTypes,md,TRUE);
break;
case Public:
- addMemberToList(MemberList::pubTypes,md,true);
+ addMemberToList(MemberList::pubTypes,md,TRUE);
break;
case Private:
- addMemberToList(MemberList::priTypes,md,true);
+ addMemberToList(MemberList::priTypes,md,TRUE);
break;
}
}
@@ -492,16 +492,16 @@ void ClassDef::internalInsertMember(MemberDef *md,
switch (prot)
{
case Protected:
- addMemberToList(MemberList::proMethods,md,true);
+ addMemberToList(MemberList::proMethods,md,TRUE);
break;
case Package:
- addMemberToList(MemberList::pacMethods,md,true);
+ addMemberToList(MemberList::pacMethods,md,TRUE);
break;
case Public:
- addMemberToList(MemberList::pubMethods,md,true);
+ addMemberToList(MemberList::pubMethods,md,TRUE);
break;
case Private:
- addMemberToList(MemberList::priMethods,md,true);
+ addMemberToList(MemberList::priMethods,md,TRUE);
break;
}
}
@@ -515,21 +515,21 @@ void ClassDef::internalInsertMember(MemberDef *md,
/*******************************************************/
if ((md->isRelated() && (extractPrivate || prot!=Private)) || md->isFriend())
{
- addMemberToList(MemberList::relatedMembers,md,false);
+ addMemberToList(MemberList::relatedMembers,md,FALSE);
}
else
{
switch (md->memberType())
{
case MemberDef::Property:
- addMemberToList(MemberList::propertyMembers,md,false);
+ addMemberToList(MemberList::propertyMembers,md,FALSE);
break;
case MemberDef::Event:
- addMemberToList(MemberList::eventMembers,md,false);
+ addMemberToList(MemberList::eventMembers,md,FALSE);
break;
case MemberDef::Signal: // fall through
case MemberDef::DCOP:
- addMemberToList(MemberList::functionMembers,md,false);
+ addMemberToList(MemberList::functionMembers,md,FALSE);
break;
case MemberDef::Slot:
switch (prot)
@@ -537,12 +537,12 @@ void ClassDef::internalInsertMember(MemberDef *md,
case Protected:
case Package:
case Public:
- addMemberToList(MemberList::functionMembers,md,false);
+ addMemberToList(MemberList::functionMembers,md,FALSE);
break;
case Private:
if (extractPrivate)
{
- addMemberToList(MemberList::functionMembers,md,false);
+ addMemberToList(MemberList::functionMembers,md,FALSE);
}
break;
}
@@ -553,13 +553,13 @@ void ClassDef::internalInsertMember(MemberDef *md,
switch (md->memberType())
{
case MemberDef::Typedef:
- addMemberToList(MemberList::typedefMembers,md,false);
+ addMemberToList(MemberList::typedefMembers,md,FALSE);
break;
case MemberDef::Enumeration:
- addMemberToList(MemberList::enumMembers,md,false);
+ addMemberToList(MemberList::enumMembers,md,FALSE);
break;
case MemberDef::EnumValue:
- addMemberToList(MemberList::enumValMembers,md,false);
+ addMemberToList(MemberList::enumValMembers,md,FALSE);
break;
case MemberDef::Function:
if (md->isConstructor() || md->isDestructor())
@@ -569,11 +569,11 @@ void ClassDef::internalInsertMember(MemberDef *md,
}
else
{
- addMemberToList(MemberList::functionMembers,md,false);
+ addMemberToList(MemberList::functionMembers,md,FALSE);
}
break;
case MemberDef::Variable:
- addMemberToList(MemberList::variableMembers,md,false);
+ addMemberToList(MemberList::variableMembers,md,FALSE);
break;
default:
err("Unexpected member type %d found!\n",md->memberType());
@@ -2002,7 +2002,7 @@ bool ClassDef::hasNonReferenceSuperClass()
}
/*! called from MemberDef::writeDeclaration() to (recusively) write the
- * definition of an annonymous struct, union or class.
+ * definition of an anonymous struct, union or class.
*/
void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
{
@@ -2125,9 +2125,9 @@ bool ClassDef::isVisibleInHierarchy()
return // show all classes or a subclass is visible
(allExternals || hasNonReferenceSuperClass()) &&
- // and not an annonymous compound
+ // and not an anonymous compound
name().find('@')==-1 &&
- // not an artifically introduced class
+ // not an artificially introduced class
!isArtificial() &&
// and not privately inherited
(m_impl->prot!=Private || extractPrivate) &&
@@ -2163,16 +2163,20 @@ bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
}
if (baseClasses())
{
- BaseClassListIterator bcli(*baseClasses());
- for ( ; bcli.current() && !found ; ++bcli)
+ //BaseClassListIterator bcli(*baseClasses());
+ //for ( ; bcli.current() && !found ; ++bcli)
+ BaseClassDef *bcdi = baseClasses()->first();
+ while (bcdi)
{
- ClassDef *ccd=bcli.current()->classDef;
+ //ClassDef *ccd=bcli.current()->classDef;
+ ClassDef *ccd=bcdi->classDef;
if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster();
//printf("isBaseClass() baseclass %s\n",ccd->name().data());
if (ccd==bcd)
found=TRUE;
else
found=ccd->isBaseClass(bcd,followInstances,level+1);
+ bcdi = baseClasses()->next();
}
}
return found;
@@ -3229,17 +3233,32 @@ void ClassDef::addMemberToList(MemberList::ListType lt,MemberDef *md,bool isBrie
static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
MemberList *ml = createMemberList(lt);
+ ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
+ ml->append(md);
+
+#if 0
if (( isBrief && sortBriefDocs ) ||
(!isBrief && sortMemberDocs)
)
ml->inSort(md);
else
ml->append(md);
+#endif
// for members in the declaration lists we set the section, needed for member grouping
if ((ml->listType()&MemberList::detailedLists)==0) md->setSectionList(this,ml);
}
+void ClassDef::sortMemberLists()
+{
+ MemberList *ml = m_impl->memberLists.first();
+ while (ml)
+ {
+ if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
+ ml = m_impl->memberLists.next();
+ }
+}
+
void ClassDef::writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title,
const char *subTitle)
{
diff --git a/src/classdef.h b/src/classdef.h
index 693e299..4b85739 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -304,6 +304,7 @@ class ClassDef : public Definition
void addListReferences();
void computeAnchors();
void mergeMembers();
+ void sortMemberLists();
void distributeMemberGroupDocumentation();
void writeDocumentation(OutputList &ol);
void writeDocumentationForInnerClasses(OutputList &ol);
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index bd6d593..16e8a7a 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -159,7 +159,7 @@ CommandMap htmlTagMap[] =
{ "div", HTML_DIV },
{ "c", XML_C },
- // { "code", XML_CODE }, <= ambigious <code> is also a HTML tag
+ // { "code", XML_CODE }, <= ambiguous <code> is also a HTML tag
{ "description", XML_DESCRIPTION },
{ "example", XML_EXAMPLE },
{ "exception", XML_EXCEPTION },
diff --git a/src/code.l b/src/code.l
index 99bb0f2..a0a8f62 100644
--- a/src/code.l
+++ b/src/code.l
@@ -283,11 +283,13 @@ ClassDef *VariableContext::findVariable(const QCString &name)
{
if (name.isEmpty()) return 0;
ClassDef *result = 0;
- QListIterator<Scope> sli(m_scopes);
+ //QListIterator<Scope> sli(m_scopes);
Scope *scope;
QCString key = name;
// search from inner to outer scope
- for (sli.toLast();(scope=sli.current());--sli)
+ scope = m_scopes.last();
+ //for (sli.toLast();(scope=sli.current());--sli)
+ while (scope)
{
result = scope->find(key);
if (result)
@@ -295,6 +297,7 @@ ClassDef *VariableContext::findVariable(const QCString &name)
DBG_CTX((stderr,"** findVariable(%s)=%p\n",name.data(),result));
return result;
}
+ scope = m_scopes.prev();
}
// nothing found -> also try the global scope
result=m_globalScope.find(name);
@@ -835,7 +838,8 @@ static bool getLinkInScope(const QCString &c, // scope
const QCString &m, // member
const char *memberText, // exact text
CodeOutputInterface &ol,
- const char *text
+ const char *text,
+ bool varOnly=FALSE
)
{
MemberDef *md;
@@ -843,9 +847,9 @@ static bool getLinkInScope(const QCString &c, // scope
FileDef *fd;
NamespaceDef *nd;
GroupDef *gd;
- //fprintf(stderr,"getLinkInScope: trying `%s'::`%s'\n",c.data(),m.data());
+ //fprintf(stderr,"getLinkInScope: trying `%s'::`%s' varOnly=%d\n",c.data(),m.data(),varOnly);
if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) &&
- md->isLinkable())
+ md->isLinkable() && (!varOnly || md->isVariable()))
{
if (g_exampleBlock)
{
@@ -894,18 +898,19 @@ static bool getLinkInScope(const QCString &c, // scope
static bool getLink(const char *className,
const char *memberName,
CodeOutputInterface &ol,
- const char *text=0)
+ const char *text=0,
+ bool varOnly=FALSE)
{
//printf("getLink(%s,%s) g_curClassName=%s\n",className,memberName,g_curClassName.data());
QCString m=removeRedundantWhiteSpace(memberName);
QCString c=className;
- if (!getLinkInScope(c,m,memberName,ol,text))
+ if (!getLinkInScope(c,m,memberName,ol,text,varOnly))
{
if (!g_curClassName.isEmpty())
{
if (!c.isEmpty()) c.prepend("::");
c.prepend(g_curClassName);
- return getLinkInScope(c,m,memberName,ol,text);
+ return getLinkInScope(c,m,memberName,ol,text,varOnly);
}
return FALSE;
}
@@ -913,7 +918,7 @@ static bool getLink(const char *className,
}
static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
- bool typeOnly=FALSE)
+ bool typeOnly=FALSE,bool varOnly=FALSE)
{
int i=0;
if (*clName=='~') // correct for matching negated values i.s.o. destructors.
@@ -953,7 +958,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
//fprintf(stderr,"is found as a type %s\n",cd?cd->name().data():"<null>");
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
- if (getLink(g_classScope,clName,ol,clName))
+ if (getLink(g_classScope,clName,ol,clName,varOnly))
{
return;
}
@@ -1031,7 +1036,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName,
md=0; // variable not accessible
}
}
- if (md)
+ if (md && (!varOnly || md->isVariable()))
{
//fprintf(stderr,"is a global md=%p g_currentDefinition=%s linkable=%d\n",md,g_currentDefinition?g_currentDefinition->name().data():"<none>",md->isLinkable());
if (md->isLinkable())
@@ -1890,7 +1895,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
{
if (ambig) // multiple input files match the name
{
- //printf("===== yes %s is ambigious\n",yytext);
+ //printf("===== yes %s is ambiguous\n",yytext);
QCString name = convertToQCString(QDir::cleanDirPath(yytext));
if (!name.isEmpty() && g_sourceFileDef)
{
@@ -2227,6 +2232,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
}
<UsingName>{ID}("::"{ID})* { addUsingDirective(yytext);
generateClassOrGlobalLink(*g_code,yytext);
+ DBG_CTX((stderr,"** scope stack push CLASSBLOCK\n"));
+ g_scopeStack.push(CLASSBLOCK);
+ pushScope(yytext);
BEGIN(Body);
}
<UsingName>\n { codifyLines(yytext); BEGIN(Body); }
@@ -2372,7 +2380,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
}
<Body>{SCOPENAME}/{BN}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
addType();
- generateClassOrGlobalLink(*g_code,yytext/*,TRUE*/);
+ generateClassOrGlobalLink(*g_code,yytext,FALSE,TRUE);
g_name+=yytext;
}
<Body>{SCOPENAME}/{B}* { // p->func()
diff --git a/src/commentcnv.l b/src/commentcnv.l
index a38228f..e508221 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -67,6 +67,7 @@ static bool g_specialComment;
static QCString g_aliasString;
static int g_blockCount;
+static bool g_lastEscaped;
static int g_lastBlockContext;
static bool g_pythonDocString;
@@ -696,30 +697,41 @@ void replaceComment(int offset);
g_lastBlockContext=YY_START;
g_blockCount=1;
g_aliasString=yytext;
+ g_lastEscaped=0;
BEGIN( ReadAliasArgs );
}
-<ReadAliasArgs>[^{}\n\*]+ {
+<ReadAliasArgs>[^{}\n\\\*]+ {
g_aliasString+=yytext;
+ g_lastEscaped=FALSE;
}
+<ReadAliasArgs>"\\" {
+ if (g_lastEscaped) g_lastEscaped=FALSE;
+ else g_lastEscaped=TRUE;
+ g_aliasString+=yytext;
+ }
<ReadAliasArgs>\n {
g_aliasString+=yytext;
g_lineNr++;
+ g_lastEscaped=FALSE;
}
<ReadAliasArgs>"{" {
g_aliasString+=yytext;
- g_blockCount++;
+ if (!g_lastEscaped) g_blockCount++;
+ g_lastEscaped=FALSE;
}
<ReadAliasArgs>"}" {
g_aliasString+=yytext;
- g_blockCount--;
+ if (!g_lastEscaped) g_blockCount--;
if (g_blockCount==0)
{
replaceAliases(g_aliasString);
BEGIN( g_lastBlockContext );
}
+ g_lastEscaped=FALSE;
}
<ReadAliasArgs>. {
g_aliasString+=yytext;
+ g_lastEscaped=FALSE;
}
<ReadLine>. {
copyToOutput(yytext,yyleng);
diff --git a/src/config.xml b/src/config.xml
index 088f9e7..b360841 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -722,7 +722,7 @@ which an include is specified. Set to NO to disable this.
If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
of all compounds will be generated. Enable this if the project
contains a lot of classes, structs, unions or interfaces.
-' defval='0'/>
+' defval='1'/>
<option type='int' id='COLS_IN_ALPHA_INDEX' docs='
If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
@@ -832,6 +832,14 @@ should uniquely identify the documentation set bundle. This should be a
reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
will append .docset to the name.
' defval='org.doxygen.Project' depends='GENERATE_DOCSET'/>
+ <option type='string' id='DOCSET_PUBLISHER_ID' format='string' docs='
+When GENERATE_DOCSET tag specifies a string that should uniquely identify
+the documentation publisher. This should be a reverse domain-name style
+string, e.g. com.mycompany.MyDocSet.documentation.
+' defval='org.doxygen.Publisher' depends='GENERATE_DOCSET'/>
+ <option type='string' id='DOCSET_PUBLISHER_NAME' format='string' docs='
+The GENERATE_DOCSET tag identifies the documentation publisher.
+' defval='Publisher' depends='GENERATE_DOCSET'/>
<option type='bool' id='GENERATE_HTMLHELP' docs='
If the GENERATE_HTMLHELP tag is set to YES, additional index files
will be generated that can be used as input for tools like the
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index a51fae4..d6f161f 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -1028,7 +1028,7 @@ void addConfigOptions(Config *cfg)
"If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index\n"
"of all compounds will be generated. Enable this if the project\n"
"contains a lot of classes, structs, unions or interfaces.",
- FALSE
+ TRUE
);
//----
ci = cfg->addInt(
@@ -1205,6 +1205,22 @@ void addConfigOptions(Config *cfg)
cs->setDefaultValue("org.doxygen.Project");
cs->addDependency("GENERATE_DOCSET");
//----
+ cs = cfg->addString(
+ "DOCSET_PUBLISHER_ID",
+ "When GENERATE_DOCSET tag specifies a string that should uniquely identify\n"
+ "the documentation publisher. This should be a reverse domain-name style\n"
+ "string, e.g. com.mycompany.MyDocSet.documentation."
+ );
+ cs->setDefaultValue("org.doxygen.Publisher");
+ cs->addDependency("GENERATE_DOCSET");
+ //----
+ cs = cfg->addString(
+ "DOCSET_PUBLISHER_NAME",
+ "The GENERATE_DOCSET tag identifies the documentation publisher."
+ );
+ cs->setDefaultValue("Publisher");
+ cs->addDependency("GENERATE_DOCSET");
+ //----
cb = cfg->addBool(
"GENERATE_HTMLHELP",
"If the GENERATE_HTMLHELP tag is set to YES, additional index files\n"
diff --git a/src/dbusxmlscanner.cpp b/src/dbusxmlscanner.cpp
index 666506d..a6141fa 100644
--- a/src/dbusxmlscanner.cpp
+++ b/src/dbusxmlscanner.cpp
@@ -597,8 +597,8 @@ private:
{
type = attributes.value(type_idx);
- QRegExp reg_exp(QString("(a?[ybnqiuxdtsogv]|a[{]sv[}])"));
- if (reg_exp.match(type))
+ QRegExp reg_exp(QCString("(a?[ybnqiuxdtsogv]|a[{]sv[}])"));
+ if (reg_exp.match(type.data()))
{ return type; }
DOC_ERROR(QString("Unnamed complex D-Bus type \"%1\" found.").arg(type));
diff --git a/src/defgen.cpp b/src/defgen.cpp
index 2c6c34b..16b57f4 100644
--- a/src/defgen.cpp
+++ b/src/defgen.cpp
@@ -35,7 +35,7 @@
#define DEF_DB(x)
-inline void writeDEFString(QTextStream &t,const char *s)
+inline void writeDEFString(FTextStream &t,const char *s)
{
const char* p=s;
char c;
@@ -51,7 +51,7 @@ inline void writeDEFString(QTextStream &t,const char *s)
}
void generateDEFForMember(MemberDef *md,
- QTextStream &t,
+ FTextStream &t,
Definition *def,
const char* Prefix)
{
@@ -312,7 +312,7 @@ void generateDEFForMember(MemberDef *md,
void generateDEFClassSection(ClassDef *cd,
- QTextStream &t,
+ FTextStream &t,
MemberList *ml,
const char *kind)
{
@@ -331,7 +331,7 @@ void generateDEFClassSection(ClassDef *cd,
}
}
-void generateDEFForClass(ClassDef *cd,QTextStream &t)
+void generateDEFForClass(ClassDef *cd,FTextStream &t)
{
// + brief description
// + detailed description
@@ -474,7 +474,7 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
}
void generateDEFSection(Definition *d,
- QTextStream &t,
+ FTextStream &t,
MemberList *ml,
const char *kind)
{
@@ -491,7 +491,7 @@ void generateDEFSection(Definition *d,
}
}
-void generateDEFForNamespace(NamespaceDef *nd,QTextStream &t)
+void generateDEFForNamespace(NamespaceDef *nd,FTextStream &t)
{
if (nd->isReference()) return; // skip external references
t << " namespace = {" << endl;
@@ -517,7 +517,7 @@ void generateDEFForNamespace(NamespaceDef *nd,QTextStream &t)
t << " };" << endl;
}
-void generateDEFForFile(FileDef *fd,QTextStream &t)
+void generateDEFForFile(FileDef *fd,FTextStream &t)
{
if (fd->isReference()) return; // skip external references
@@ -600,7 +600,7 @@ void generateDEF()
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
- QTextStream t(&f);
+ FTextStream t(&f);
t << "AutoGen Definitions dummy;" << endl;
if (Doxygen::classSDict->count()+Doxygen::inputNameList->count()>0)
diff --git a/src/diagram.cpp b/src/diagram.cpp
index ee5111e..96d057a 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <qlist.h>
#include <qarray.h>
-#include <qtextstream.h>
+#include "ftextstream.h"
#include <qfile.h>
#include "diagram.h"
@@ -142,7 +142,7 @@ static void writeBitmapBox(DiagramItem *di,Image *image,
}
}
-static void writeVectorBox(QTextStream &t,DiagramItem *di,
+static void writeVectorBox(FTextStream &t,DiagramItem *di,
float x,float y,bool children=FALSE)
{
if (di->virtualness()==Virtual) t << "dashed\n";
@@ -151,7 +151,7 @@ static void writeVectorBox(QTextStream &t,DiagramItem *di,
if (di->virtualness()==Virtual) t << "solid\n";
}
-static void writeMapArea(QTextStream &t,ClassDef *cd,QCString relPath,
+static void writeMapArea(FTextStream &t,ClassDef *cd,QCString relPath,
int x,int y,int w,int h)
{
if (cd->isLinkable())
@@ -161,7 +161,7 @@ static void writeMapArea(QTextStream &t,ClassDef *cd,QCString relPath,
t << "<area ";
if (!ref.isEmpty())
{
- t << "doxygen=\"" << ref << ":";
+ t << "target=\"_blank\" doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" ";
}
@@ -485,7 +485,7 @@ void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos)
if (maxXPos) *maxXPos=mx;
}
-void TreeDiagram::drawBoxes(QTextStream &t,Image *image,
+void TreeDiagram::drawBoxes(FTextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellHeight,
@@ -616,7 +616,7 @@ void TreeDiagram::drawBoxes(QTextStream &t,Image *image,
}
}
-void TreeDiagram::drawConnectors(QTextStream &t,Image *image,
+void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellHeight)
@@ -968,7 +968,7 @@ ClassDiagram::~ClassDiagram()
delete super;
}
-void ClassDiagram::writeFigure(QTextStream &output,const char *path,
+void ClassDiagram::writeFigure(FTextStream &output,const char *path,
const char *fileName) const
{
uint baseRows=base->computeRows();
@@ -1018,7 +1018,7 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
err("Could not open file %s for writing\n",convertToQCString(f1.name()).data());
exit(1);
}
- QTextStream t(&f1);
+ FTextStream t(&f1);
//printf("writeEPS() rows=%d cols=%d\n",rows,cols);
@@ -1262,7 +1262,7 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
}
-void ClassDiagram::writeImage(QTextStream &t,const char *path,
+void ClassDiagram::writeImage(FTextStream &t,const char *path,
const char *relPath,const char *fileName,
bool generateMap) const
{
diff --git a/src/diagram.h b/src/diagram.h
index 96a0658..1d1bde9 100644
--- a/src/diagram.h
+++ b/src/diagram.h
@@ -25,6 +25,7 @@ class TreeDiagram;
class ClassDiagram;
class DiagramItemList;
class Image;
+class FTextStream;
class DiagramItem
{
@@ -101,13 +102,13 @@ class TreeDiagram : public QList<DiagramRow>
//uint computeCols();
void moveChildren(DiagramItem *root,int dx);
void computeExtremes(uint *labelWidth,uint *xpos);
- void drawBoxes(QTextStream &t,Image *image,
+ void drawBoxes(FTextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellHeight,
QCString relPath="",
bool generateMap=TRUE);
- void drawConnectors(QTextStream &t,Image *image,
+ void drawConnectors(FTextStream &t,Image *image,
bool doBase,bool bitmap,
uint baseRows,uint superRows,
uint cellWidth,uint cellheight);
@@ -122,9 +123,9 @@ class ClassDiagram
public:
ClassDiagram(ClassDef *root);
~ClassDiagram();
- void writeFigure(QTextStream &t,const char *path,
+ void writeFigure(FTextStream &t,const char *path,
const char *file) const;
- void writeImage(QTextStream &t,const char *path,const char *relPath,
+ void writeImage(FTextStream &t,const char *path,const char *relPath,
const char *file,bool generateMap=TRUE) const;
private:
TreeDiagram *base;
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index 0d9faf6..84fa3ab 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -9,6 +9,7 @@
#include "message.h"
#include "dot.h"
#include "layout.h"
+#include "ftextstream.h"
//----------------------------------------------------------------------
// method implementation
@@ -662,7 +663,7 @@ DirDef *DirDef::mergeDirectoryInTree(const QCString &path)
return dir;
}
-void DirDef::writeDepGraph(QTextStream &t)
+void DirDef::writeDepGraph(FTextStream &t)
{
writeDotDirDepGraph(t,this);
}
diff --git a/src/dirdef.h b/src/dirdef.h
index 376fcb1..e5e7ef2 100644
--- a/src/dirdef.h
+++ b/src/dirdef.h
@@ -30,7 +30,7 @@ class QStrList;
class FileDef;
class OutputList;
class UsedDir;
-class QTextStream;
+class FTextStream;
class DirDef;
@@ -69,7 +69,7 @@ class DirDef : public Definition
// generate output
void writeDocumentation(OutputList &ol);
- void writeDepGraph(QTextStream &t);
+ void writeDepGraph(FTextStream &t);
static DirDef *mergeDirectoryInTree(const QCString &path);
bool visited;
diff --git a/src/docparser.cpp b/src/docparser.cpp
index cd7e956..6ac8ae4 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -70,15 +70,15 @@ static const char *sectionLevelToName[] =
// Parser state: global variables during a call to validatingParseDoc
static Definition * g_scope;
-static QString g_context;
+static QCString g_context;
static bool g_inSeeBlock;
static bool g_insideHtmlLink;
static QStack<DocNode> g_nodeStack;
static QStack<DocStyleChange> g_styleStack;
static QStack<DocStyleChange> g_initialStyleStack;
static QList<Definition> g_copyStack;
-static QString g_fileName;
-static QString g_relPath;
+static QCString g_fileName;
+static QCString g_relPath;
static bool g_hasParamCommand;
static bool g_hasReturnCommand;
@@ -89,7 +89,7 @@ static QCString g_exampleName;
static SectionDict * g_sectionDict;
static QCString g_searchUrl;
-static QString g_includeFileText;
+static QCString g_includeFileText;
static uint g_includeFileOffset;
static uint g_includeFileLength;
@@ -97,15 +97,15 @@ static uint g_includeFileLength;
struct DocParserContext
{
Definition *scope;
- QString context;
+ QCString context;
bool inSeeBlock;
bool insideHtmlLink;
QStack<DocNode> nodeStack;
QStack<DocStyleChange> styleStack;
QStack<DocStyleChange> initialStyleStack;
QList<Definition> copyStack;
- QString fileName;
- QString relPath;
+ QCString fileName;
+ QCString relPath;
bool hasParamCommand;
bool hasReturnCommand;
@@ -116,7 +116,7 @@ struct DocParserContext
SectionDict *sectionDict;
QCString searchUrl;
- QString includeFileText;
+ QCString includeFileText;
uint includeFileOffset;
uint includeFileLength;
@@ -297,7 +297,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
else if (ambig)
{
QCString text;
- text.sprintf("Warning: image file name %s is ambigious.\n",fileName);
+ text.sprintf("Warning: image file name %s is ambiguous.\n",fileName);
text+="Possible candidates:\n";
text+=showFileDefMatches(Doxygen::imageNameDict,fileName);
warn_doc_error(g_fileName,doctokenizerYYlineno,text);
@@ -322,7 +322,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
* member g_memberDef, then a warning is raised (unless warnings
* are disabled altogether).
*/
-static void checkArgumentName(const QString &name,bool isParam)
+static void checkArgumentName(const QCString &name,bool isParam)
{
if (!Config_getBool("WARN_IF_DOC_ERROR")) return;
if (g_memberDef==0) return; // not a member
@@ -334,16 +334,16 @@ static void checkArgumentName(const QString &name,bool isParam)
static QRegExp re("[a-zA-Z0-9_\\x80-\\xFF]+\\.*");
int p=0,i=0,l;
- while ((i=re.match(name,p,&l))!=-1) // to handle @param x,y
+ while ((i=re.match(name.data(),p,&l))!=-1) // to handle @param x,y
{
- QString aName=name.mid(i,l);
+ QCString aName=name.mid(i,l);
//printf("aName=`%s'\n",aName.data());
ArgumentListIterator ali(*al);
Argument *a;
bool found=FALSE;
for (ali.toFirst();(a=ali.current());++ali)
{
- QString argName = g_memberDef->isDefine() ? a->type : a->name;
+ QCString argName = g_memberDef->isDefine() ? a->type : a->name;
argName=argName.stripWhiteSpace();
//printf("argName=`%s'\n",argName.data());
if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
@@ -358,10 +358,10 @@ static void checkArgumentName(const QString &name,bool isParam)
if (!found && isParam)
{
//printf("member type=%d\n",memberDef->memberType());
- QString scope=g_memberDef->getScopeString();
+ QCString scope=g_memberDef->getScopeString();
if (!scope.isEmpty()) scope+="::"; else scope="";
- QString inheritedFrom = "";
- QString docFile = g_memberDef->docFile();
+ QCString inheritedFrom = "";
+ QCString docFile = g_memberDef->docFile();
int docLine = g_memberDef->docLine();
MemberDef *inheritedMd = g_memberDef->inheritsDocsFrom();
if (inheritedMd) // documentation was inherited
@@ -402,7 +402,7 @@ static void checkUndocumentedParams()
bool found=FALSE;
for (ali.toFirst();(a=ali.current());++ali)
{
- QString argName = g_memberDef->isDefine() ? a->type : a->name;
+ QCString argName = g_memberDef->isDefine() ? a->type : a->name;
argName=argName.stripWhiteSpace();
if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
if (getLanguageFromFileName(g_memberDef->getDefFileName())==SrcLangExt_Python && argName=="self")
@@ -418,14 +418,14 @@ static void checkUndocumentedParams()
if (found)
{
bool first=TRUE;
- QString errMsg=
+ QCString errMsg=
"Warning: The following parameters of "+
- QString(g_memberDef->qualifiedName()) +
- QString(argListToString(al.pointer())) +
+ QCString(g_memberDef->qualifiedName()) +
+ QCString(argListToString(al.pointer())) +
" are not documented:\n";
for (ali.toFirst();(a=ali.current());++ali)
{
- QString argName = g_memberDef->isDefine() ? a->type : a->name;
+ QCString argName = g_memberDef->isDefine() ? a->type : a->name;
argName=argName.stripWhiteSpace();
if (getLanguageFromFileName(g_memberDef->getDefFileName())==SrcLangExt_Python && argName=="self")
{
@@ -472,7 +472,7 @@ static void detectNoDocumentedParams()
{
LockingPtr<ArgumentList> al = g_memberDef->argumentList();
LockingPtr<ArgumentList> declAl = g_memberDef->declArgumentList();
- QString returnType = g_memberDef->typeString();
+ QCString returnType = g_memberDef->typeString();
bool isPython = getLanguageFromFileName(g_memberDef->getDefFileName())==SrcLangExt_Python;
if (!g_memberDef->hasDocumentedParams() &&
@@ -551,15 +551,15 @@ static void detectNoDocumentedParams()
//---------------------------------------------------------------------------
/*! Strips known html and tex extensions from \a text. */
-static QString stripKnownExtensions(const char *text)
+static QCString stripKnownExtensions(const char *text)
{
- QString result=text;
+ QCString result=text;
if (result.right(4)==".tex")
{
result=result.left(result.length()-4);
}
else if (result.right(Doxygen::htmlFileExtension.length())==
- QString(Doxygen::htmlFileExtension))
+ QCString(Doxygen::htmlFileExtension))
{
result=result.left(result.length()-Doxygen::htmlFileExtension.length());
}
@@ -657,15 +657,15 @@ static bool insideTable(DocNode *n)
* @retval FALSE if name was not found.
*/
static bool findDocsForMemberOrCompound(const char *commandName,
- QString *pDoc,
- QString *pBrief,
+ QCString *pDoc,
+ QCString *pBrief,
Definition **pDef)
{
//printf("findDocsForMemberOrCompound(%s)\n",commandName);
*pDoc="";
*pBrief="";
*pDef=0;
- QString cmdArg=substitute(commandName,"#","::");
+ QCString cmdArg=substitute(commandName,"#","::");
int l=cmdArg.length();
if (l==0) return FALSE;
@@ -689,8 +689,8 @@ static bool findDocsForMemberOrCompound(const char *commandName,
}
}
- QString name=removeRedundantWhiteSpace(cmdArg.left(funcStart).latin1());
- QString args=cmdArg.right(l-funcStart);
+ QCString name=removeRedundantWhiteSpace(cmdArg.left(funcStart));
+ QCString args=cmdArg.right(l-funcStart);
// try if the link is to a member
MemberDef *md=0;
@@ -700,9 +700,9 @@ static bool findDocsForMemberOrCompound(const char *commandName,
GroupDef *gd=0;
PageDef *pd=0;
bool found = getDefs(
- g_context.find('.')==-1?g_context.latin1():"", // `find('.') is a hack to detect files
- name.latin1(),
- args.isEmpty()?0:args.latin1(),
+ g_context.find('.')==-1?g_context.data():"", // `find('.') is a hack to detect files
+ name.data(),
+ args.isEmpty()?0:args.data(),
md,cd,fd,nd,gd,FALSE,0,TRUE);
//printf("found=%d context=%s name=%s\n",found,g_context.data(),name.data());
if (found && md)
@@ -717,7 +717,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
int scopeOffset=g_context.length();
do // for each scope
{
- QString fullName=cmdArg;
+ QCString fullName=cmdArg;
if (scopeOffset>0)
{
fullName.prepend(g_context.left(scopeOffset)+"::");
@@ -790,10 +790,10 @@ static bool defaultHandleToken(DocNode *parent,int tok,
static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
- const QString &cmdName)
+ const QCString &cmdName)
{
DBG(("handleStyleArgument(%s)\n",cmdName.data()));
- QString tokenName = g_token->name;
+ QCString tokenName = g_token->name;
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
@@ -996,16 +996,16 @@ static void handleLinkedWord(DocNode *parent,QList<DocNode> &children)
{
Definition *compound=0;
MemberDef *member=0;
- QString name = linkToText(g_token->name,TRUE);
+ QCString name = linkToText(g_token->name,TRUE);
int len = g_token->name.length();
ClassDef *cd=0;
bool ambig;
FileDef *fd = findFileDef(Doxygen::inputNameDict,g_fileName,ambig);
//printf("handleLinkedWord(%s) g_context=%s\n",name.data(),g_context.data());
if (!g_insideHtmlLink &&
- (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member,TRUE,fd)
+ (resolveRef(g_context,g_token->name,g_inSeeBlock,&compound,&member,TRUE,fd,TRUE)
|| (!g_context.isEmpty() && // also try with global scope
- resolveRef("",g_token->name,g_inSeeBlock,&compound,&member))
+ resolveRef("",g_token->name,g_inSeeBlock,&compound,&member,FALSE,0,TRUE))
)
)
{
@@ -1116,7 +1116,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
}
DBG(("\n"));
reparsetoken:
- QString tokenName = g_token->name;
+ QCString tokenName = g_token->name;
switch (tok)
{
case TK_COMMAND:
@@ -1432,7 +1432,7 @@ handlepara:
//---------------------------------------------------------------------------
-DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter)
+DocSymbol::SymType DocSymbol::decodeSymbol(const QCString &symName,char *letter)
{
int l=symName.length();
DBG(("decodeSymbol(%s) l=%d\n",symName.data(),l));
@@ -1501,7 +1501,7 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter)
//---------------------------------------------------------------------------
static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children,
- const QString &doc)
+ const QCString &doc)
{
int retval = RetVal_OK;
@@ -1540,7 +1540,7 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children,
//---------------------------------------------------------------------------
-static void readTextFileByName(const QString &file,QString &text)
+static void readTextFileByName(const QCString &file,QCString &text)
{
bool ambig;
FileDef *fd;
@@ -1550,7 +1550,7 @@ static void readTextFileByName(const QString &file,QString &text)
}
else if (ambig)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: included file name %s is ambigious"
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: included file name %s is ambiguous"
"Possible candidates:\n%s",file.data(),
showFileDefMatches(Doxygen::exampleNameDict,file).data()
);
@@ -1564,7 +1564,7 @@ static void readTextFileByName(const QString &file,QString &text)
//---------------------------------------------------------------------------
-DocWord::DocWord(DocNode *parent,const QString &word) :
+DocWord::DocWord(DocNode *parent,const QCString &word) :
m_parent(parent), m_word(word)
{
//printf("new word %s url=%s\n",word.data(),g_searchUrl.data());
@@ -1576,9 +1576,9 @@ DocWord::DocWord(DocNode *parent,const QString &word) :
//---------------------------------------------------------------------------
-DocLinkedWord::DocLinkedWord(DocNode *parent,const QString &word,
- const QString &ref,const QString &file,
- const QString &anchor,const QString &tooltip) :
+DocLinkedWord::DocLinkedWord(DocNode *parent,const QCString &word,
+ const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &tooltip) :
m_parent(parent), m_word(word), m_ref(ref),
m_file(file), m_relPath(g_relPath), m_anchor(anchor),
m_tooltip(tooltip)
@@ -1592,7 +1592,7 @@ DocLinkedWord::DocLinkedWord(DocNode *parent,const QString &word,
//---------------------------------------------------------------------------
-DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
+DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
: m_parent(parent)
{
if (id.isEmpty())
@@ -1628,9 +1628,9 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
//---------------------------------------------------------------------------
-DocVerbatim::DocVerbatim(DocNode *parent,const QString &context,
- const QString &text, Type t,bool isExample,
- const QString &exampleFile)
+DocVerbatim::DocVerbatim(DocNode *parent,const QCString &context,
+ const QCString &text, Type t,bool isExample,
+ const QCString &exampleFile)
: m_parent(parent), m_context(context), m_text(text), m_type(t),
m_isExample(isExample), m_exampleFile(exampleFile), m_relPath(g_relPath)
{
@@ -1787,7 +1787,7 @@ void DocIncOperator::parse()
void DocCopy::parse()
{
- QString doc,brief;
+ QCString doc,brief;
Definition *def;
if (findDocsForMemberOrCompound(m_link,&doc,&brief,&def))
{
@@ -1882,7 +1882,7 @@ DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
bool DocXRefItem::parse()
{
- QString listName;
+ QCString listName;
RefList *refList = Doxygen::xrefLists->find(m_key);
if (refList &&
(
@@ -1929,7 +1929,7 @@ bool DocXRefItem::parse()
DocFormula::DocFormula(DocNode *parent,int id) :
m_parent(parent), m_relPath(g_relPath)
{
- QString formCmd;
+ QCString formCmd;
formCmd.sprintf("\\form#%d",id);
Formula *formula=Doxygen::formulaNameDict[formCmd];
if (formula)
@@ -2096,7 +2096,7 @@ endsecreflist:
//---------------------------------------------------------------------------
-DocInternalRef::DocInternalRef(DocNode *parent,const QString &ref)
+DocInternalRef::DocInternalRef(DocNode *parent,const QCString &ref)
: m_parent(parent), m_relPath(g_relPath)
{
int i=ref.find('#');
@@ -2147,7 +2147,7 @@ void DocInternalRef::parse()
//---------------------------------------------------------------------------
-DocRef::DocRef(DocNode *parent,const QString &target,const QString &context) :
+DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_parent(parent), m_refToSection(FALSE), m_refToAnchor(FALSE)
{
Definition *compound = 0;
@@ -2289,7 +2289,7 @@ void DocRef::parse()
//---------------------------------------------------------------------------
-DocLink::DocLink(DocNode *parent,const QString &target) :
+DocLink::DocLink(DocNode *parent,const QCString &target) :
m_parent(parent)
{
Definition *compound;
@@ -2326,9 +2326,9 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
}
-QString DocLink::parse(bool isJavaLink,bool isXmlLink)
+QCString DocLink::parse(bool isJavaLink,bool isXmlLink)
{
- QString result;
+ QCString result;
g_nodeStack.push(this);
DBG(("DocLink::parse() start\n"));
@@ -2369,7 +2369,7 @@ QString DocLink::parse(bool isJavaLink,bool isXmlLink)
case TK_WORD:
if (isJavaLink) // special case to detect closing }
{
- QString w = g_token->name;
+ QCString w = g_token->name;
int p;
if (w=="}")
{
@@ -2417,7 +2417,7 @@ endlink:
//---------------------------------------------------------------------------
-DocDotFile::DocDotFile(DocNode *parent,const QString &name,const QString &context) :
+DocDotFile::DocDotFile(DocNode *parent,const QCString &name,const QCString &context) :
m_parent(parent), m_name(name), m_relPath(g_relPath), m_context(context)
{
}
@@ -2480,7 +2480,7 @@ void DocDotFile::parse()
}
else if (ambig)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: included dot file name %s is ambigious.\n"
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: included dot file name %s is ambiguous.\n"
"Possible candidates:\n%s",m_name.data(),
showFileDefMatches(Doxygen::exampleNameDict,m_name).data()
);
@@ -2499,7 +2499,7 @@ void DocDotFile::parse()
//---------------------------------------------------------------------------
-DocImage::DocImage(DocNode *parent,const HtmlAttribList &attribs,const QString &name,Type t) :
+DocImage::DocImage(DocNode *parent,const HtmlAttribList &attribs,const QCString &name,Type t) :
m_parent(parent), m_attribs(attribs), m_name(name),
m_type(t), m_relPath(g_relPath)
{
@@ -3314,7 +3314,7 @@ int DocHtmlDescTitle::parse()
{
case TK_COMMAND:
{
- QString cmdName=g_token->name;
+ QCString cmdName=g_token->name;
bool isJavaLink=FALSE;
switch (Mappers::cmdMapper->map(cmdName))
{
@@ -3370,7 +3370,7 @@ int DocHtmlDescTitle::parse()
doctokenizerYYsetStatePara();
DocLink *lnk = new DocLink(this,g_token->name);
m_children.append(lnk);
- QString leftOver = lnk->parse(isJavaLink);
+ QCString leftOver = lnk->parse(isJavaLink);
if (!leftOver.isEmpty())
{
m_children.append(new DocWord(this,leftOver));
@@ -3831,7 +3831,7 @@ void DocTitle::parse()
ASSERT(n==this);
}
-void DocTitle::parseFromString(const QString &text)
+void DocTitle::parseFromString(const QCString &text)
{
m_children.append(new DocWord(this,text));
}
@@ -3903,7 +3903,7 @@ int DocSimpleSect::parseRcs()
m_title = new DocTitle(this);
m_title->parseFromString(g_token->name);
- QString text = g_token->text;
+ QCString text = g_token->text;
docParserPushContext(); // this will create a new g_token
internalValidatingParseDoc(this,m_children,text);
docParserPopContext(); // this will restore the old g_token
@@ -3952,7 +3952,7 @@ int DocSimpleSect::parseXml()
return retval;
}
-void DocSimpleSect::appendLinkWord(const QString &word)
+void DocSimpleSect::appendLinkWord(const QCString &word)
{
DocPara *p;
if (m_children.isEmpty() || m_children.last()->kind()!=DocNode::Kind_Para)
@@ -4001,7 +4001,7 @@ QCString DocSimpleSect::typeString() const
//--------------------------------------------------------------------------
-int DocParamList::parse(const QString &cmdName)
+int DocParamList::parse(const QCString &cmdName)
{
int retval=RetVal_OK;
DBG(("DocParamList::parse() start\n"));
@@ -4055,7 +4055,7 @@ endparamlist:
return retval;
}
-int DocParamList::parseXml(const QString &paramName)
+int DocParamList::parseXml(const QCString &paramName)
{
int retval=RetVal_OK;
DBG(("DocParamList::parseXml() start\n"));
@@ -4125,7 +4125,7 @@ int DocParamList::parseXml(const QString &paramName)
//--------------------------------------------------------------------------
-int DocParamSect::parse(const QString &cmdName,bool xmlContext, Direction d)
+int DocParamSect::parse(const QCString &cmdName,bool xmlContext, Direction d)
{
int retval=RetVal_OK;
DBG(("DocParamSect::parse() start\n"));
@@ -4191,7 +4191,7 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t, bool xmlContext)
return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
}
-int DocPara::handleParamSection(const QString &cmdName,
+int DocPara::handleParamSection(const QCString &cmdName,
DocParamSect::Type t,
bool xmlContext=FALSE,
int direction=DocParamSect::Unspecified)
@@ -4235,7 +4235,7 @@ int DocPara::handleXRefItem()
return retval;
}
-void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type t)
+void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t)
{
DBG(("handleIncludeOperator(%s)\n",cmdName.data()));
int tok=doctokenizerYYlex();
@@ -4286,7 +4286,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
op->parse();
}
-void DocPara::handleImage(const QString &cmdName)
+void DocPara::handleImage(const QCString &cmdName)
{
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
@@ -4310,7 +4310,7 @@ void DocPara::handleImage(const QString &cmdName)
return;
}
DocImage::Type t;
- QString imgType = g_token->name.lower();
+ QCString imgType = g_token->name.lower();
if (imgType=="html") t=DocImage::Html;
else if (imgType=="latex") t=DocImage::Latex;
else if (imgType=="rtf") t=DocImage::Rtf;
@@ -4336,7 +4336,7 @@ void DocPara::handleImage(const QString &cmdName)
img->parse();
}
-void DocPara::handleDotFile(const QString &cmdName)
+void DocPara::handleDotFile(const QCString &cmdName)
{
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
@@ -4354,13 +4354,13 @@ void DocPara::handleDotFile(const QString &cmdName)
tokToString(tok),cmdName.data());
return;
}
- QString name = g_token->name;
+ QCString name = g_token->name;
DocDotFile *df = new DocDotFile(this,name,g_context);
m_children.append(df);
df->parse();
}
-void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
+void DocPara::handleLink(const QCString &cmdName,bool isJavaLink)
{
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
@@ -4380,14 +4380,14 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
doctokenizerYYsetStatePara();
DocLink *lnk = new DocLink(this,g_token->name);
m_children.append(lnk);
- QString leftOver = lnk->parse(isJavaLink);
+ QCString leftOver = lnk->parse(isJavaLink);
if (!leftOver.isEmpty())
{
m_children.append(new DocWord(this,leftOver));
}
}
-void DocPara::handleRef(const QString &cmdName)
+void DocPara::handleRef(const QCString &cmdName)
{
DBG(("handleRef(%s)\n",cmdName.data()));
int tok=doctokenizerYYlex();
@@ -4414,7 +4414,7 @@ endref:
}
-void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
+void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
{
DBG(("handleInclude(%s)\n",cmdName.data()));
int tok=doctokenizerYYlex();
@@ -4444,7 +4444,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
inc->parse();
}
-void DocPara::handleSection(const QString &cmdName)
+void DocPara::handleSection(const QCString &cmdName)
{
// get the argument of the section command.
int tok=doctokenizerYYlex();
@@ -4484,7 +4484,7 @@ int DocPara::handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level)
// For XML tags whose content is stored in attributes rather than
// contained within the element, we need a way to inject the attribute
// text into the current paragraph.
-bool DocPara::injectToken(int tok,const QString &tokText)
+bool DocPara::injectToken(int tok,const QCString &tokText)
{
g_token->name = tokText;
return defaultHandleToken(this,tok,m_children);
@@ -4532,7 +4532,7 @@ void DocPara::handleInheritDoc()
}
-int DocPara::handleCommand(const QString &cmdName)
+int DocPara::handleCommand(const QCString &cmdName)
{
DBG(("handleCommand(%s)\n",cmdName.data()));
int retval = RetVal_OK;
@@ -4925,7 +4925,7 @@ int DocPara::handleCommand(const QString &cmdName)
static bool findAttribute(const HtmlAttribList &tagHtmlAttribs,
const char *attrName,
- QString *result)
+ QCString *result)
{
HtmlAttribListIterator li(tagHtmlAttribs);
@@ -4941,7 +4941,7 @@ static bool findAttribute(const HtmlAttribList &tagHtmlAttribs,
return FALSE;
}
-int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tagHtmlAttribs)
+int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &tagHtmlAttribs)
{
DBG(("handleHtmlStartTag(%s,%d)\n",tagName.data(),tagHtmlAttribs.count()));
int retval=RetVal_OK;
@@ -5136,7 +5136,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
case XML_PARAM:
case XML_TYPEPARAM:
{
- QString paramName;
+ QCString paramName;
if (findAttribute(tagHtmlAttribs,"name",&paramName))
{
retval = handleParamSection(paramName,
@@ -5152,7 +5152,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
case XML_PARAMREF:
case XML_TYPEPARAMREF:
{
- QString paramName;
+ QCString paramName;
if (findAttribute(tagHtmlAttribs,"name",&paramName))
{
//printf("paramName=%s\n",paramName.data());
@@ -5169,7 +5169,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
break;
case XML_EXCEPTION:
{
- QString exceptName;
+ QCString exceptName;
if (findAttribute(tagHtmlAttribs,"cref",&exceptName))
{
retval = handleParamSection(exceptName,DocParamSect::Exception,TRUE);
@@ -5212,7 +5212,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
// C# specification is extremely vague about this (but what else
// can we expect from Microsoft...)
{
- QString cref;
+ QCString cref;
//printf("XML_SEE: empty tag=%d\n",g_token->emptyTag);
if (findAttribute(tagHtmlAttribs,"cref",&cref))
{
@@ -5232,7 +5232,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
doctokenizerYYsetStatePara();
DocLink *lnk = new DocLink(this,cref);
m_children.append(lnk);
- QString leftOver = lnk->parse(FALSE,TRUE);
+ QCString leftOver = lnk->parse(FALSE,TRUE);
if (!leftOver.isEmpty())
{
m_children.append(new DocWord(this,leftOver));
@@ -5247,7 +5247,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
break;
case XML_SEEALSO:
{
- QString cref;
+ QCString cref;
if (findAttribute(tagHtmlAttribs,"cref",&cref))
{
// Look for an existing "see" section
@@ -5279,7 +5279,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
break;
case XML_LIST:
{
- QString type;
+ QCString type;
findAttribute(tagHtmlAttribs,"type",&type);
DocHtmlList::Type listType = DocHtmlList::Unordered;
if (type=="number")
@@ -5317,7 +5317,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
return retval;
}
-int DocPara::handleHtmlEndTag(const QString &tagName)
+int DocPara::handleHtmlEndTag(const QCString &tagName)
{
DBG(("handleHtmlEndTag(%s)\n",tagName.data()));
int tagId = Mappers::htmlTagMapper->map(tagName);
@@ -6220,8 +6220,8 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_fileName = fileName;
g_relPath = (!linkFromIndex && ctx) ?
- QString(relativePathToRoot(ctx->getOutputFileBase())) :
- QString("");
+ QCString(relativePathToRoot(ctx->getOutputFileBase())) :
+ QCString("");
//printf("ctx->name=%s relPath=%s\n",ctx->name().data(),g_relPath.data());
g_memberDef = md;
g_nodeStack.clear();
diff --git a/src/docparser.h b/src/docparser.h
index 51a8455..6deb1f5 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -22,8 +22,7 @@
#include <stdio.h>
#include <qlist.h>
-#include <qstrlist.h>
-#include <qstring.h>
+#include <qcstring.h>
#include "docvisitor.h"
#include "htmlattrib.h"
@@ -189,15 +188,15 @@ template<class T> class CompAccept
class DocWord : public DocNode
{
public:
- DocWord(DocNode *parent,const QString &word);
- QString word() const { return m_word; }
+ DocWord(DocNode *parent,const QCString &word);
+ QCString word() const { return m_word; }
Kind kind() const { return Kind_Word; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
private:
DocNode *m_parent;
- QString m_word;
+ QCString m_word;
};
/*! @brief Node representing a word that can be linked to something
@@ -205,36 +204,36 @@ class DocWord : public DocNode
class DocLinkedWord : public DocNode
{
public:
- DocLinkedWord(DocNode *parent,const QString &word,
- const QString &ref,const QString &file,
- const QString &anchor,const QString &tooltip);
- QString word() const { return m_word; }
+ DocLinkedWord(DocNode *parent,const QCString &word,
+ const QCString &ref,const QCString &file,
+ const QCString &anchor,const QCString &tooltip);
+ QCString word() const { return m_word; }
Kind kind() const { return Kind_LinkedWord; }
DocNode *parent() const { return m_parent; }
- QString file() const { return m_file; }
- QString relPath() const { return m_relPath; }
- QString ref() const { return m_ref; }
- QString anchor() const { return m_anchor; }
- QString tooltip() const { return m_tooltip; }
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString ref() const { return m_ref; }
+ QCString anchor() const { return m_anchor; }
+ QCString tooltip() const { return m_tooltip; }
void accept(DocVisitor *v) { v->visit(this); }
private:
DocNode *m_parent;
- QString m_word;
- QString m_ref;
- QString m_file;
- QString m_relPath;
- QString m_anchor;
- QString m_tooltip;
+ QCString m_word;
+ QCString m_ref;
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_anchor;
+ QCString m_tooltip;
};
/*! @brief Node representing an URL (or email address) */
class DocURL : public DocNode
{
public:
- DocURL(DocNode *parent,const QString &url,bool isEmail) :
+ DocURL(DocNode *parent,const QCString &url,bool isEmail) :
m_parent(parent), m_url(url), m_isEmail(isEmail) {}
- QString url() const { return m_url; }
+ QCString url() const { return m_url; }
Kind kind() const { return Kind_URL; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
@@ -242,7 +241,7 @@ class DocURL : public DocNode
private:
DocNode *m_parent;
- QString m_url;
+ QCString m_url;
bool m_isEmail;
};
@@ -278,17 +277,17 @@ class DocHorRuler : public DocNode
class DocAnchor : public DocNode
{
public:
- DocAnchor(DocNode *parent,const QString &id,bool newAnchor);
+ DocAnchor(DocNode *parent,const QCString &id,bool newAnchor);
Kind kind() const { return Kind_Anchor; }
DocNode *parent() const { return m_parent; }
- QString anchor() const { return m_anchor; }
- QString file() const { return m_file; }
+ QCString anchor() const { return m_anchor; }
+ QCString file() const { return m_file; }
void accept(DocVisitor *v) { v->visit(this); }
private:
DocNode *m_parent;
- QString m_anchor;
- QString m_file;
+ QCString m_anchor;
+ QCString m_file;
};
/*! @brief Node representing a style change */
@@ -336,7 +335,7 @@ class DocSymbol : public DocNode
Kind kind() const { return Kind_Symbol; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
- static SymType decodeSymbol(const QString &symName,char *letter);
+ static SymType decodeSymbol(const QCString &symName,char *letter);
private:
DocNode *m_parent;
@@ -348,15 +347,15 @@ class DocSymbol : public DocNode
class DocWhiteSpace : public DocNode
{
public:
- DocWhiteSpace(DocNode *parent,const QString &chars) :
+ DocWhiteSpace(DocNode *parent,const QCString &chars) :
m_parent(parent), m_chars(chars) {}
Kind kind() const { return Kind_WhiteSpace; }
- QString chars() const { return m_chars; }
+ QCString chars() const { return m_chars; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
private:
DocNode *m_parent;
- QString m_chars;
+ QCString m_chars;
};
/*! @brief Node representing a verbatim, unparsed text fragment */
@@ -364,27 +363,27 @@ class DocVerbatim : public DocNode
{
public:
enum Type { Code, HtmlOnly, ManOnly, LatexOnly, XmlOnly, Verbatim, Dot, Msc };
- DocVerbatim(DocNode *parent,const QString &context,
- const QString &text, Type t,bool isExample,
- const QString &exampleFile);
+ DocVerbatim(DocNode *parent,const QCString &context,
+ const QCString &text, Type t,bool isExample,
+ const QCString &exampleFile);
Kind kind() const { return Kind_Verbatim; }
Type type() const { return m_type; }
- QString text() const { return m_text; }
- QString context() const { return m_context; }
+ QCString text() const { return m_text; }
+ QCString context() const { return m_context; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
bool isExample() const { return m_isExample; }
- QString exampleFile() const { return m_exampleFile; }
- QString relPath() const { return m_relPath; }
+ QCString exampleFile() const { return m_exampleFile; }
+ QCString relPath() const { return m_relPath; }
private:
DocNode *m_parent;
- QString m_context;
- QString m_text;
+ QCString m_context;
+ QCString m_text;
Type m_type;
bool m_isExample;
- QString m_exampleFile;
- QString m_relPath;
+ QCString m_exampleFile;
+ QCString m_relPath;
};
@@ -393,36 +392,36 @@ class DocInclude : public DocNode
{
public:
enum Type { Include, DontInclude, VerbInclude, HtmlInclude, IncWithLines };
- DocInclude(DocNode *parent,const QString &file,
- const QString context, Type t,
- bool isExample,const QString exampleFile) :
+ DocInclude(DocNode *parent,const QCString &file,
+ const QCString context, Type t,
+ bool isExample,const QCString exampleFile) :
m_parent(parent), m_file(file), m_context(context), m_type(t),
m_isExample(isExample), m_exampleFile(exampleFile) {}
Kind kind() const { return Kind_Include; }
- QString file() const { return m_file; }
- QString extension() const { int i=m_file.findRev('.');
+ QCString file() const { return m_file; }
+ QCString extension() const { int i=m_file.findRev('.');
if (i!=-1)
return m_file.right(m_file.length()-i);
else
return "";
}
Type type() const { return m_type; }
- QString text() const { return m_text; }
- QString context() const { return m_context; }
+ QCString text() const { return m_text; }
+ QCString context() const { return m_context; }
DocNode *parent() const { return m_parent; }
bool isExample() const { return m_isExample; }
- QString exampleFile() const { return m_exampleFile; }
+ QCString exampleFile() const { return m_exampleFile; }
void accept(DocVisitor *v) { v->visit(this); }
void parse();
private:
DocNode *m_parent;
- QString m_file;
- QString m_context;
- QString m_text;
+ QCString m_file;
+ QCString m_context;
+ QCString m_text;
Type m_type;
bool m_isExample;
- QString m_exampleFile;
+ QCString m_exampleFile;
};
/*! @brief Node representing a include/dontinclude operator block */
@@ -430,16 +429,16 @@ class DocIncOperator : public DocNode
{
public:
enum Type { Line, SkipLine, Skip, Until };
- DocIncOperator(DocNode *parent,Type t,const QString &pat,
- const QString &context,bool isExample,const QString &exampleFile) :
+ DocIncOperator(DocNode *parent,Type t,const QCString &pat,
+ const QCString &context,bool isExample,const QCString &exampleFile) :
m_parent(parent), m_type(t), m_pattern(pat), m_context(context),
m_isFirst(FALSE), m_isLast(FALSE),
m_isExample(isExample), m_exampleFile(exampleFile) {}
Kind kind() const { return Kind_IncOperator; }
Type type() const { return m_type; }
- QString text() const { return m_text; }
- QString pattern() const { return m_pattern; }
- QString context() const { return m_context; }
+ QCString text() const { return m_text; }
+ QCString pattern() const { return m_pattern; }
+ QCString context() const { return m_context; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
bool isFirst() const { return m_isFirst; }
@@ -447,19 +446,19 @@ class DocIncOperator : public DocNode
void markFirst(bool v=TRUE) { m_isFirst = v; }
void markLast(bool v=TRUE) { m_isLast = v; }
bool isExample() const { return m_isExample; }
- QString exampleFile() const { return m_exampleFile; }
+ QCString exampleFile() const { return m_exampleFile; }
void parse();
private:
DocNode *m_parent;
Type m_type;
- QString m_text;
- QString m_pattern;
- QString m_context;
+ QCString m_text;
+ QCString m_pattern;
+ QCString m_context;
bool m_isFirst;
bool m_isLast;
bool m_isExample;
- QString m_exampleFile;
+ QCString m_exampleFile;
};
/*! @brief Node representing an item of a cross-referenced list */
@@ -468,9 +467,9 @@ class DocFormula : public DocNode
public:
DocFormula(DocNode *parent,int id);
Kind kind() const { return Kind_Formula; }
- QString name() const { return m_name; }
- QString text() const { return m_text; }
- QString relPath() const { return m_relPath; }
+ QCString name() const { return m_name; }
+ QCString text() const { return m_text; }
+ QCString relPath() const { return m_relPath; }
int id() const { return m_id; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
@@ -478,9 +477,9 @@ class DocFormula : public DocNode
private:
DocNode *m_parent;
- QString m_name;
- QString m_text;
- QString m_relPath;
+ QCString m_name;
+ QCString m_text;
+ QCString m_relPath;
int m_id;
};
@@ -495,12 +494,12 @@ class DocIndexEntry : public DocNode
DocNode *parent() const { return m_parent; }
Definition *scope() const { return m_scope; }
MemberDef *member() const { return m_member; }
- QString entry() const { return m_entry; }
+ QCString entry() const { return m_entry; }
void accept(DocVisitor *v) { v->visit(this); }
private:
DocNode *m_parent;
- QString m_entry;
+ QCString m_entry;
Definition *m_scope;
MemberDef *m_member;
};
@@ -511,18 +510,18 @@ class DocIndexEntry : public DocNode
class DocCopy : public CompAccept<DocCopy>, public DocNode
{
public:
- DocCopy(DocNode *parent,const QString &link,bool copyBrief,bool copyDetails)
+ DocCopy(DocNode *parent,const QCString &link,bool copyBrief,bool copyDetails)
: m_parent(parent), m_link(link),
m_copyBrief(copyBrief), m_copyDetails(copyDetails) { }
Kind kind() const { return Kind_Copy; }
- QString link() const { return m_link; }
+ QCString link() const { return m_link; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocCopy>::accept(this,v); }
void parse();
private:
DocNode *m_parent;
- QString m_link;
+ QCString m_link;
bool m_copyBrief;
bool m_copyDetails;
};
@@ -557,7 +556,7 @@ class DocTitle : public CompAccept<DocTitle>, public DocNode
public:
DocTitle(DocNode *parent) : m_parent(parent) {}
void parse();
- void parseFromString(const QString &title);
+ void parseFromString(const QCString &title);
Kind kind() const { return Kind_Title; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocTitle>::accept(this,v); }
@@ -573,12 +572,12 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
//enum Type { Bug, Test, Todo, Deprecated };
DocXRefItem(DocNode *parent,int id,const char *key);
Kind kind() const { return Kind_XRefItem; }
- QString file() const { return m_file; }
- QString anchor() const { return m_anchor; }
- QString title() const { return m_title; }
+ QCString file() const { return m_file; }
+ QCString anchor() const { return m_anchor; }
+ QCString title() const { return m_title; }
DocNode *parent() const { return m_parent; }
- QString relPath() const { return m_relPath; }
- QString key() const { return m_key; }
+ QCString relPath() const { return m_relPath; }
+ QCString key() const { return m_key; }
void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); }
bool parse();
const QList<DocNode> &children() const { return m_children; }
@@ -586,11 +585,11 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
private:
DocNode *m_parent;
int m_id;
- QString m_key;
- QString m_file;
- QString m_anchor;
- QString m_title;
- QString m_relPath;
+ QCString m_key;
+ QCString m_file;
+ QCString m_anchor;
+ QCString m_title;
+ QCString m_relPath;
};
/*! @brief Node representing an image */
@@ -598,15 +597,15 @@ class DocImage : public CompAccept<DocImage>, public DocNode
{
public:
enum Type { Html, Latex, Rtf };
- DocImage(DocNode *parent,const HtmlAttribList &attribs,const QString &name,Type t);
+ DocImage(DocNode *parent,const HtmlAttribList &attribs,const QCString &name,Type t);
Kind kind() const { return Kind_Image; }
Type type() const { return m_type; }
- QString name() const { return m_name; }
+ QCString name() const { return m_name; }
DocNode *parent() const { return m_parent; }
bool hasCaption() const { return !m_children.isEmpty(); }
- QString width() const { return m_width; }
- QString height() const { return m_height; }
- QString relPath() const { return m_relPath; }
+ QCString width() const { return m_width; }
+ QCString height() const { return m_height; }
+ QCString relPath() const { return m_relPath; }
const HtmlAttribList &attribs() const { return m_attribs; }
void accept(DocVisitor *v) { CompAccept<DocImage>::accept(this,v); }
void parse();
@@ -614,74 +613,74 @@ class DocImage : public CompAccept<DocImage>, public DocNode
private:
DocNode *m_parent;
HtmlAttribList m_attribs;
- QString m_name;
+ QCString m_name;
Type m_type;
- QString m_width;
- QString m_height;
- QString m_relPath;
+ QCString m_width;
+ QCString m_height;
+ QCString m_relPath;
};
/*! @brief Node representing a dot file */
class DocDotFile : public CompAccept<DocDotFile>, public DocNode
{
public:
- DocDotFile(DocNode *parent,const QString &name,const QString &context);
+ DocDotFile(DocNode *parent,const QCString &name,const QCString &context);
void parse();
Kind kind() const { return Kind_DotFile; }
- QString name() const { return m_name; }
- QString file() const { return m_file; }
- QString relPath() const { return m_relPath; }
+ QCString name() const { return m_name; }
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
bool hasCaption() const { return !m_children.isEmpty(); }
- QString width() const { return m_width; }
- QString height() const { return m_height; }
+ QCString width() const { return m_width; }
+ QCString height() const { return m_height; }
DocNode *parent() const { return m_parent; }
- QString context() const { return m_context; }
+ QCString context() const { return m_context; }
void accept(DocVisitor *v) { CompAccept<DocDotFile>::accept(this,v); }
private:
DocNode *m_parent;
- QString m_name;
- QString m_file;
- QString m_relPath;
- QString m_width;
- QString m_height;
- QString m_context;
+ QCString m_name;
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_width;
+ QCString m_height;
+ QCString m_context;
};
/*! @brief Node representing a link to some item */
class DocLink : public CompAccept<DocLink>, public DocNode
{
public:
- DocLink(DocNode *parent,const QString &target);
- QString parse(bool,bool isXmlLink=FALSE);
+ DocLink(DocNode *parent,const QCString &target);
+ QCString parse(bool,bool isXmlLink=FALSE);
Kind kind() const { return Kind_Link; }
- QString file() const { return m_file; }
- QString relPath() const { return m_relPath; }
- QString ref() const { return m_ref; }
- QString anchor() const { return m_anchor; }
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString ref() const { return m_ref; }
+ QCString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocLink>::accept(this,v); }
private:
DocNode *m_parent;
- QString m_file;
- QString m_relPath;
- QString m_ref;
- QString m_anchor;
- QString m_refText;
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_ref;
+ QCString m_anchor;
+ QCString m_refText;
};
/*! @brief Node representing a reference to some item */
class DocRef : public CompAccept<DocRef>, public DocNode
{
public:
- DocRef(DocNode *parent,const QString &target,const QString &context);
+ DocRef(DocNode *parent,const QCString &target,const QCString &context);
void parse();
Kind kind() const { return Kind_Ref; }
- QString file() const { return m_file; }
- QString relPath() const { return m_relPath; }
- QString ref() const { return m_ref; }
- QString anchor() const { return m_anchor; }
- QString targetTitle() const { return m_text; }
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString ref() const { return m_ref; }
+ QCString anchor() const { return m_anchor; }
+ QCString targetTitle() const { return m_text; }
DocNode *parent() const { return m_parent; }
bool hasLinkText() const { return !m_children.isEmpty(); }
bool refToAnchor() const { return m_refToAnchor; }
@@ -692,40 +691,40 @@ class DocRef : public CompAccept<DocRef>, public DocNode
DocNode * m_parent;
bool m_refToSection;
bool m_refToAnchor;
- QString m_file;
- QString m_relPath;
- QString m_ref;
- QString m_anchor;
- QString m_text;
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_ref;
+ QCString m_anchor;
+ QCString m_text;
};
/*! @brief Node representing an internal reference to some item */
class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
{
public:
- DocInternalRef(DocNode *parent,const QString &target);
+ DocInternalRef(DocNode *parent,const QCString &target);
void parse();
Kind kind() const { return Kind_Ref; }
- QString file() const { return m_file; }
- QString relPath() const { return m_relPath; }
- QString anchor() const { return m_anchor; }
+ QCString file() const { return m_file; }
+ QCString relPath() const { return m_relPath; }
+ QCString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocInternalRef>::accept(this,v); }
private:
DocNode * m_parent;
- QString m_file;
- QString m_relPath;
- QString m_anchor;
+ QCString m_file;
+ QCString m_relPath;
+ QCString m_anchor;
};
/*! @brief Node representing a Language specific section */
//class DocLanguage : public CompAccept<DocLanguage>, public DocNode
//{
// public:
-// DocLanguage(DocNode *parent,const QString &id) :
+// DocLanguage(DocNode *parent,const QCString &id) :
// m_parent(parent), m_id(id) {}
-// QString id() const { return m_id; }
+// QCString id() const { return m_id; }
// Kind kind() const { return Kind_Language; }
// DocNode *parent() const { return m_parent; }
// void accept(DocVisitor *v) { CompAccept<DocLanguage>::accept(this,v); }
@@ -733,17 +732,17 @@ class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
//
// private:
// DocNode * m_parent;
-// QString m_id;
+// QCString m_id;
//};
/*! @brief Node representing a Hypertext reference */
class DocHRef : public CompAccept<DocHRef>, public DocNode
{
public:
- DocHRef(DocNode *parent,const HtmlAttribList &attribs,const QString &url) :
+ DocHRef(DocNode *parent,const HtmlAttribList &attribs,const QCString &url) :
m_parent(parent), m_attribs(attribs), m_url(url) {}
int parse();
- QString url() const { return m_url; }
+ QCString url() const { return m_url; }
Kind kind() const { return Kind_HRef; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHRef>::accept(this,v); }
@@ -752,7 +751,7 @@ class DocHRef : public CompAccept<DocHRef>, public DocNode
private:
DocNode * m_parent;
HtmlAttribList m_attribs;
- QString m_url;
+ QCString m_url;
};
/*! @brief Node Html heading */
@@ -812,14 +811,14 @@ class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode
class DocSection : public CompAccept<DocSection>, public DocNode
{
public:
- DocSection(DocNode *parent,int level,const QString &id) :
+ DocSection(DocNode *parent,int level,const QCString &id) :
m_parent(parent), m_level(level), m_id(id) {}
Kind kind() const { return Kind_Section; }
int level() const { return m_level; }
- QString title() const { return m_title; }
- QString anchor() const { return m_anchor; }
- QString id() const { return m_id; }
- QString file() const { return m_file; }
+ QCString title() const { return m_title; }
+ QCString anchor() const { return m_anchor; }
+ QCString id() const { return m_id; }
+ QCString file() const { return m_file; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocSection>::accept(this,v); }
int parse();
@@ -827,22 +826,22 @@ class DocSection : public CompAccept<DocSection>, public DocNode
private:
DocNode *m_parent;
int m_level;
- QString m_id;
- QString m_title;
- QString m_anchor;
- QString m_file;
+ QCString m_id;
+ QCString m_title;
+ QCString m_anchor;
+ QCString m_file;
};
/*! @brief Node representing a reference to a section */
class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode
{
public:
- DocSecRefItem(DocNode *parent,const QString &target) :
+ DocSecRefItem(DocNode *parent,const QCString &target) :
m_parent(parent), m_target(target) {}
Kind kind() const { return Kind_SecRefItem; }
- QString target() const { return m_target; }
- QString file() const { return m_file; }
- QString anchor() const { return m_anchor; }
+ QCString target() const { return m_target; }
+ QCString file() const { return m_file; }
+ QCString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocSecRefItem>::accept(this,v); }
void parse();
@@ -850,9 +849,9 @@ class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode
private:
DocNode *m_parent;
- QString m_target;
- QString m_file;
- QString m_anchor;
+ QCString m_target;
+ QCString m_file;
+ QCString m_anchor;
};
/*! @brief Node representing a list of section references */
@@ -937,7 +936,7 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode
int parse(bool userTitle,bool needsSeparator);
int parseRcs();
int parseXml();
- void appendLinkWord(const QString &word);
+ void appendLinkWord(const QCString &word);
const QList<DocNode> &children() const { return m_children; }
private:
@@ -975,7 +974,7 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode
};
DocParamSect(DocNode *parent,Type t)
: m_parent(parent), m_type(t) {}
- int parse(const QString &cmdName,bool xmlContext,Direction d);
+ int parse(const QCString &cmdName,bool xmlContext,Direction d);
Kind kind() const { return Kind_ParamSect; }
Type type() const { return m_type; }
DocNode *parent() const { return m_parent; }
@@ -1005,29 +1004,29 @@ class DocPara : public CompAccept<DocPara>, public DocNode
const QList<DocNode> &children() const { return m_children; }
QList<DocNode> &children() { return m_children; }
- int handleCommand(const QString &cmdName);
- int handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tagHtmlAttribs);
- int handleHtmlEndTag(const QString &tagName);
+ int handleCommand(const QCString &cmdName);
+ int handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &tagHtmlAttribs);
+ int handleHtmlEndTag(const QCString &tagName);
int handleSimpleSection(DocSimpleSect::Type t,bool xmlContext=FALSE);
int handleXRefItem();
- int handleParamSection(const QString &cmdName,DocParamSect::Type t,
+ int handleParamSection(const QCString &cmdName,DocParamSect::Type t,
bool xmlContext,
int direction);
- void handleIncludeOperator(const QString &cmdName,DocIncOperator::Type t);
- void handleImage(const QString &cmdName);
- void handleDotFile(const QString &cmdName);
- void handleInclude(const QString &cmdName,DocInclude::Type t);
- void handleLink(const QString &cmdName,bool isJavaLink);
- void handleRef(const QString &cmdName);
- void handleSection(const QString &cmdName);
+ void handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t);
+ void handleImage(const QCString &cmdName);
+ void handleDotFile(const QCString &cmdName);
+ void handleInclude(const QCString &cmdName,DocInclude::Type t);
+ void handleLink(const QCString &cmdName,bool isJavaLink);
+ void handleRef(const QCString &cmdName);
+ void handleSection(const QCString &cmdName);
void handleInheritDoc();
int handleStartCode();
int handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level);
- bool injectToken(int tok,const QString &tokText);
+ bool injectToken(int tok,const QCString &tokText);
private:
DocNode *m_parent;
- QString m_sectionId;
+ QCString m_sectionId;
bool m_isFirst;
bool m_isLast;
};
@@ -1057,8 +1056,8 @@ class DocParamList : public DocNode
for (cli.toFirst();(n=cli.current());++cli) n->accept(v);
v->visitPost(this);
}
- int parse(const QString &cmdName);
- int parseXml(const QString &paramName);
+ int parse(const QCString &cmdName);
+ int parseXml(const QCString &paramName);
private:
DocNode * m_parent;
diff --git a/src/docsets.cpp b/src/docsets.cpp
index 449ac1f..76e90db 100644
--- a/src/docsets.cpp
+++ b/src/docsets.cpp
@@ -44,6 +44,10 @@ void DocSets::initialize()
if (bundleId.isEmpty()) bundleId="org.doxygen.Project";
QCString feedName = Config_getString("DOCSET_FEEDNAME");
if (feedName.isEmpty()) feedName="FeedName";
+ QCString publisherId = Config_getString("DOCSET_PUBLISHER_ID");
+ if (publisherId.isEmpty()) publisherId="PublisherId";
+ QCString publisherName = Config_getString("DOCSET_PUBLISHER_NAME");
+ if (publisherName.isEmpty()) publisherName="PublisherName";
// -- write Makefile
{
@@ -54,8 +58,7 @@ void DocSets::initialize()
err("Could not open file %s for writing\n",mfName.data());
exit(1);
}
- QTextStream ts(&makefile);
- ts.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream ts(&makefile);
ts << "DOCSET_NAME=" << bundleId << ".docset\n"
"DOCSET_CONTENTS=$(DOCSET_NAME)/Contents\n"
@@ -103,8 +106,7 @@ void DocSets::initialize()
err("Could not open file %s for writing\n",plName.data());
exit(1);
}
- QTextStream ts(&plist);
- ts.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream ts(&plist);
ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n"
@@ -117,6 +119,10 @@ void DocSets::initialize()
" <string>" << bundleId << ".docset</string>\n"
" <key>DocSetFeedName</key>\n"
" <string>" << feedName << "</string>\n"
+ " <key>DocSetPublisherIdentifier</key>\n"
+ " <string>" << publisherId << "</string>\n"
+ " <key>DocSetPublisherName</key>\n"
+ " <string>" << publisherName << "</string>\n"
"</dict>\n"
"</plist>\n";
}
@@ -131,7 +137,6 @@ void DocSets::initialize()
}
QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index";
m_nts.setDevice(m_nf);
- m_nts.setEncoding(QTextStream::UnicodeUTF8);
m_nts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
m_nts << "<DocSetNodes version=\"1.0\">" << endl;
m_nts << " <TOC>" << endl;
@@ -151,7 +156,6 @@ void DocSets::initialize()
exit(1);
}
m_tts.setDevice(m_tf);
- m_tts.setEncoding(QTextStream::UnicodeUTF8);
m_tts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
m_tts << "<Tokens version=\"1.0\">" << endl;
}
@@ -218,12 +222,11 @@ void DocSets::addContentsItem(bool isDir,
m_firstNode.at(m_dc-1)=FALSE;
m_nts << indent() << " <Node>" << endl;
m_nts << indent() << " <Name>" << convertToXML(name) << "</Name>" << endl;
- m_nts << indent() << " <Path>" << file << Doxygen::htmlFileExtension;
+ m_nts << indent() << " <Path>" << file << Doxygen::htmlFileExtension << "</Path>" << endl;
if (anchor)
{
- m_nts << "#" << anchor;
+ m_nts << indent() << " <Anchor>" << anchor << "</Anchor>" << endl;
}
- m_nts << "</Path>" << endl;
}
}
@@ -409,7 +412,7 @@ void DocSets::addIndexItem(Definition *context,MemberDef *md,
}
}
-void DocSets::writeToken(QTextStream &t,
+void DocSets::writeToken(FTextStream &t,
const Definition *d,
const QCString &type,
const QCString &lang,
diff --git a/src/docsets.h b/src/docsets.h
index d4558d0..31b5263 100644
--- a/src/docsets.h
+++ b/src/docsets.h
@@ -17,10 +17,9 @@
#define DOCSETS_H
#include "qtbc.h"
-#include <qtextstream.h>
#include <qstrlist.h>
#include "sortdict.h"
-
+#include "ftextstream.h"
#include "index.h"
class QFile;
@@ -56,7 +55,7 @@ class DocSets : public IndexIntf
void addStyleSheetFile(const char *) {}
private:
- void writeToken(QTextStream &t, const Definition *d,
+ void writeToken(FTextStream &t, const Definition *d,
const QCString &type, const QCString &lang,
const char *scope=0, const char *anchor=0,
const char *decl=0);
@@ -75,8 +74,8 @@ class DocSets : public IndexIntf
QCString indent();
QFile *m_nf;
QFile *m_tf;
- QTextStream m_nts;
- QTextStream m_tts;
+ FTextStream m_nts;
+ FTextStream m_tts;
int m_dc;
int m_id;
QArray<bool> m_firstNode;
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index 036d982..7660385 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -19,7 +19,7 @@
#ifndef _DOCTOKENIZER_H
#define _DOCTOKENIZER_H
-#include <qstring.h>
+#include <qcstring.h>
#include <qlist.h>
#include "htmlattrib.h"
@@ -68,10 +68,10 @@ struct TokenInfo
char unknownChar;
// command token
- QString name;
+ QCString name;
// command text (RCS tag)
- QString text;
+ QCString text;
// comment blocks
@@ -80,14 +80,14 @@ struct TokenInfo
int indent;
// sections
- QString sectionId;
+ QCString sectionId;
// simple section
- QString simpleSectName;
- QString simpleSectText;
+ QCString simpleSectName;
+ QCString simpleSectText;
// verbatim fragment
- QString verb;
+ QCString verb;
// xrefitem
int id;
@@ -98,7 +98,7 @@ struct TokenInfo
bool emptyTag;
// whitespace
- QString chars;
+ QCString chars;
// url
bool isEMailAddr;
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index a7bcead..d220395 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -42,7 +42,7 @@ static int g_commentState;
TokenInfo *g_token = 0;
static int g_inputPos = 0;
static const char *g_inputString;
-static QString g_fileName;
+static QCString g_fileName;
static bool g_insidePre;
// context for section finding phase
@@ -256,7 +256,7 @@ static void handleHtmlTag()
}
}
-static QString stripEmptyLines(const char *s)
+static QCString stripEmptyLines(const char *s)
{
int result=0,p=0;
for (;;)
@@ -382,14 +382,14 @@ REFWORD {LABELID}|{REFWORD2}
%%
<St_Para>\r /* skip carriage return */
<St_Para>^{LISTITEM} { /* list item */
- QString text=yytext;
+ QCString text=yytext;
int dashPos = text.findRev('-');
g_token->isEnumList = text.at(dashPos+1)=='#';
g_token->indent = computeIndent(yytext,dashPos);
return TK_LISTITEM;
}
<St_Para>{BLANK}*\n{LISTITEM} { /* list item on next line */
- QString text=yytext;
+ QCString text=yytext;
text=text.right(text.length()-text.find('\n')-1);
int dashPos = text.findRev('-');
g_token->isEnumList = text.at(dashPos+1)=='#';
@@ -397,12 +397,12 @@ REFWORD {LABELID}|{REFWORD2}
return TK_LISTITEM;
}
<St_Para>^{ENDLIST} { /* end list */
- int dotPos = QString(yytext).findRev('.');
+ int dotPos = QCString(yytext).findRev('.');
g_token->indent = computeIndent(yytext,dotPos);
return TK_ENDLIST;
}
<St_Para>{BLANK}*\n{ENDLIST} { /* end list on next line */
- QString text=yytext;
+ QCString text=yytext;
text=text.right(text.length()-text.find('\n')-1);
int dotPos = text.findRev('.');
g_token->indent = computeIndent(text,dotPos);
@@ -422,7 +422,7 @@ REFWORD {LABELID}|{REFWORD2}
<St_Para>{SPCMD3} {
g_token->name = "form";
bool ok;
- g_token->id = QString(yytext).right(yyleng-6).toInt(&ok);
+ g_token->id = QCString(yytext).right(yyleng-6).toInt(&ok);
ASSERT(ok);
return TK_COMMAND;
}
@@ -435,7 +435,7 @@ REFWORD {LABELID}|{REFWORD2}
}
<St_Para>{PARAMIO} { /* param [in,out] command */
g_token->name = "param";
- QString s(yytext);
+ QCString s(yytext);
bool isIn = s.find("in")!=-1;
bool isOut = s.find("out")!=-1;
if (isIn)
@@ -470,7 +470,7 @@ REFWORD {LABELID}|{REFWORD2}
return TK_URL;
}
<St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
- QString tagName(yytext+1);
+ QCString tagName(yytext+1);
int index=tagName.find(':');
g_token->name = tagName.left(index+1);
g_token->text = tagName.mid(index+2,tagName.length()-index-3);
@@ -774,7 +774,7 @@ REFWORD {LABELID}|{REFWORD2}
BEGIN(St_XRefItem2);
}
<St_XRefItem2>[0-9]+"." {
- QString numStr=yytext;
+ QCString numStr=yytext;
numStr=numStr.left(yyleng-1);
g_token->id=numStr.toInt();
return RetVal_OK;
@@ -802,7 +802,7 @@ REFWORD {LABELID}|{REFWORD2}
return TK_WORD;
}
<St_File>"\""[^\n\"]+"\"" {
- QString text=yytext;
+ QCString text=yytext;
g_token->name = text.mid(1,text.length()-2);
return TK_WORD;
}
diff --git a/src/dot.cpp b/src/dot.cpp
index 04be1c1..5d9b975 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -38,7 +38,7 @@
#include "vhdldocgen.h"
#include <qdir.h>
#include <qfile.h>
-#include <qtextstream.h>
+#include "ftextstream.h"
#include <md5.h>
#define MAP_CMD "cmapx"
@@ -92,7 +92,7 @@ static int getDotFontSize()
return dotFontSize;
}
-static void writeGraphHeader(QTextStream &t)
+static void writeGraphHeader(FTextStream &t)
{
t << "digraph G" << endl;
t << "{" << endl;
@@ -108,7 +108,7 @@ static void writeGraphHeader(QTextStream &t)
"fontsize=\"" << FONTSIZE << "\",shape=record];\n";
}
-static void writeGraphFooter(QTextStream &t)
+static void writeGraphFooter(FTextStream &t)
{
t << "}" << endl;
}
@@ -124,9 +124,9 @@ static void writeGraphFooter(QTextStream &t)
* map file was found
* \returns TRUE if succesful.
*/
-static bool convertMapFile(QTextStream &t,const char *mapName,
+static bool convertMapFile(FTextStream &t,const char *mapName,
const QCString relPath, bool urlOnly=FALSE,
- const QString &context=QString())
+ const QCString &context=QCString())
{
QFile f(mapName);
if (!f.open(IO_ReadOnly))
@@ -189,7 +189,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName,
QCString url = link.mid(marker+1);
if (!ref.isEmpty())
{
- result = "doxygen=\"" + ref + ":";
+ result = "target=\"_blank\" doxygen=\"" + ref + ":";
if ((dest=Doxygen::tagDestinationDict[ref])) result += *dest + "/";
result += "\" ";
}
@@ -629,7 +629,7 @@ static QCString escapeTooltip(const QCString &tooltip)
return result;
}
-static void writeBoxMemberList(QTextStream &t,char prot,MemberList *ml,ClassDef *scope)
+static void writeBoxMemberList(FTextStream &t,char prot,MemberList *ml,ClassDef *scope)
{
if (ml)
{
@@ -662,7 +662,7 @@ static void writeBoxMemberList(QTextStream &t,char prot,MemberList *ml,ClassDef
}
}
-void DotNode::writeBox(QTextStream &t,
+void DotNode::writeBox(FTextStream &t,
GraphType gt,
GraphOutputFormat /*format*/,
bool hasNonReachableChildren,
@@ -764,7 +764,7 @@ void DotNode::writeBox(QTextStream &t,
t << "];" << endl;
}
-void DotNode::writeArrow(QTextStream &t,
+void DotNode::writeArrow(FTextStream &t,
GraphType gt,
GraphOutputFormat format,
DotNode *cn,
@@ -807,7 +807,7 @@ void DotNode::writeArrow(QTextStream &t,
t << "];" << endl;
}
-void DotNode::write(QTextStream &t,
+void DotNode::write(FTextStream &t,
GraphType gt,
GraphOutputFormat format,
bool topDown,
@@ -865,7 +865,7 @@ void DotNode::write(QTextStream &t,
//printf("end DotNode::write(%d) name=%s\n",distance,m_label.data());
}
-void DotNode::writeXML(QTextStream &t,bool isClassGraph)
+void DotNode::writeXML(FTextStream &t,bool isClassGraph)
{
t << " <node id=\"" << m_number << "\">" << endl;
t << " <label>" << convertToXML(m_label) << "</label>" << endl;
@@ -934,7 +934,7 @@ void DotNode::writeXML(QTextStream &t,bool isClassGraph)
}
-void DotNode::writeDEF(QTextStream &t)
+void DotNode::writeDEF(FTextStream &t)
{
const char* nodePrefix = " node-";
@@ -1101,7 +1101,7 @@ const DotNode *DotNode::findDocNode() const
int DotGfxHierarchyTable::m_curNodeNumber;
-void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) const
+void DotGfxHierarchyTable::writeGraph(FTextStream &out,const char *path) const
{
//printf("DotGfxHierarchyTable::writeGraph(%s)\n",name);
//printf("m_rootNodes=%p count=%d\n",m_rootNodes,m_rootNodes->count());
@@ -1140,9 +1140,9 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) const
DotNode *node;
// compute md5 checksum of the graph were are about to generate
- QString theGraph;
- QTextStream md5stream(&theGraph,IO_WriteOnly);
- md5stream.setEncoding(md5stream.UnicodeUTF8);
+ QGString theGraph;
+ FTextStream md5stream(&theGraph);
+ //md5stream.setEncoding(md5stream.UnicodeUTF8);
writeGraphHeader(md5stream);
md5stream << " rankdir=LR;" << endl;
for (dnli2.toFirst();(node=dnli2.current());++dnli2)
@@ -1163,7 +1163,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) const
resetReNumbering();
uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)theGraph.ascii(),theGraph.length(),md5_sig);
+ MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.data(),33);
if (checkAndUpdateMd5Signature(absBaseName,sigStr) ||
!QFileInfo(absMapName).exists())
@@ -1172,8 +1172,8 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path) const
QCString dotName=absBaseName+".dot";
QFile f(dotName);
if (!f.open(IO_WriteOnly)) return;
- QTextStream t(&f);
- t.setEncoding(t.UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(t.UnicodeUTF8);
t << theGraph;
f.close();
resetReNumbering();
@@ -1777,9 +1777,9 @@ QCString computeMd5Signature(DotNode *root,
bool reNumber=TRUE;
//printf("computeMd5Signature\n");
- QString buf;
- QTextStream md5stream(&buf,IO_WriteOnly);
- md5stream.setEncoding(md5stream.UnicodeUTF8);
+ QGString buf;
+ FTextStream md5stream(&buf);
+ //md5stream.setEncoding(md5stream.UnicodeUTF8);
writeGraphHeader(md5stream);
if (lrRank)
{
@@ -1824,13 +1824,13 @@ QCString computeMd5Signature(DotNode *root,
writeGraphFooter(md5stream);
uchar md5_sig[16];
QCString sigStr(33);
- MD5Buffer((const unsigned char *)buf.ascii(),buf.length(),md5_sig);
+ MD5Buffer((const unsigned char *)buf.data(),buf.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.data(),33);
if (reNumber)
{
resetReNumbering();
}
- graphStr=buf.ascii();
+ graphStr=buf.data();
//printf("md5: %s | file: %s\n",sigStr,baseName.data());
return sigStr;
}
@@ -1854,8 +1854,8 @@ static bool updateDotGraph(DotNode *root,
f.setName(baseName+".dot");
if (f.open(IO_WriteOnly))
{
- QTextStream t(&f);
- t.setEncoding(t.UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(t.UnicodeUTF8);
t << theGraph;
}
return TRUE;
@@ -1884,7 +1884,7 @@ QCString DotClassGraph::diskName() const
return result;
}
-QCString DotClassGraph::writeGraph(QTextStream &out,
+QCString DotClassGraph::writeGraph(FTextStream &out,
GraphOutputFormat format,
const char *path,
const char *relPath,
@@ -1989,9 +1989,8 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
break;
}
out << "\"/></div>" << endl;
- QString tmpstr;
- QTextOStream tmpout(&tmpstr);
- tmpout.setEncoding(tmpout.UnicodeUTF8);
+ QGString tmpstr;
+ FTextStream tmpout(&tmpstr);
convertMapFile(tmpout,absBaseName+".map",relPath);
if (!tmpstr.isEmpty())
{
@@ -2039,7 +2038,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
//--------------------------------------------------------------------
-void DotClassGraph::writeXML(QTextStream &t)
+void DotClassGraph::writeXML(FTextStream &t)
{
QDictIterator<DotNode> dni(*m_usedNodes);
DotNode *node;
@@ -2049,7 +2048,7 @@ void DotClassGraph::writeXML(QTextStream &t)
}
}
-void DotClassGraph::writeDEF(QTextStream &t)
+void DotClassGraph::writeDEF(FTextStream &t)
{
QDictIterator<DotNode> dni(*m_usedNodes);
DotNode *node;
@@ -2223,7 +2222,7 @@ QCString DotInclDepGraph::diskName() const
return convertNameToFile(result);
}
-QCString DotInclDepGraph::writeGraph(QTextStream &out,
+QCString DotInclDepGraph::writeGraph(FTextStream &out,
GraphOutputFormat format,
const char *path,
const char *relPath,
@@ -2301,9 +2300,9 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
<< imgExt << "\" border=\"0\" usemap=\"#"
<< mapName << "_map\" alt=\"\"/>";
out << "</div>" << endl;
- QString tmpstr;
- QTextOStream tmpout(&tmpstr);
- tmpout.setEncoding(tmpout.UnicodeUTF8);
+ QGString tmpstr;
+ FTextStream tmpout(&tmpstr);
+ //tmpout.setEncoding(tmpout.UnicodeUTF8);
convertMapFile(tmpout,absBaseName+".map",relPath);
if (!tmpstr.isEmpty())
{
@@ -2351,7 +2350,7 @@ bool DotInclDepGraph::isTooBig() const
return numNodes>=maxNodes;
}
-void DotInclDepGraph::writeXML(QTextStream &t)
+void DotInclDepGraph::writeXML(FTextStream &t)
{
QDictIterator<DotNode> dni(*m_usedNodes);
DotNode *node;
@@ -2518,7 +2517,7 @@ DotCallGraph::~DotCallGraph()
delete m_usedNodes;
}
-QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format,
+QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat format,
const char *path,const char *relPath,bool generateImageMap) const
{
QDir d(path);
@@ -2586,11 +2585,11 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format,
out << "<div class=\"center\"><img src=\"" << relPath << baseName << "."
<< imgExt << "\" border=\"0\" usemap=\"#"
<< mapName << "_map\" alt=\"";
- out << "\">";
+ out << "\"/>";
out << "</div>" << endl;
- QString tmpstr;
- QTextOStream tmpout(&tmpstr);
- tmpout.setEncoding(tmpout.UnicodeUTF8);
+ QGString tmpstr;
+ FTextStream tmpout(&tmpstr);
+ //tmpout.setEncoding(tmpout.UnicodeUTF8);
convertMapFile(tmpout,absBaseName+".map",relPath);
if (!tmpstr.isEmpty())
{
@@ -2648,7 +2647,7 @@ DotDirDeps::~DotDirDeps()
{
}
-QCString DotDirDeps::writeGraph(QTextStream &out,
+QCString DotDirDeps::writeGraph(FTextStream &out,
GraphOutputFormat format,
const char *path,
const char *relPath,
@@ -2675,8 +2674,8 @@ QCString DotDirDeps::writeGraph(QTextStream &out,
{
err("Cannot create file %s.dot for writing!\n",baseName.data());
}
- QTextStream t(&f);
- t.setEncoding(t.UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(t.UnicodeUTF8);
m_dir->writeDepGraph(t);
f.close();
@@ -2724,9 +2723,9 @@ QCString DotDirDeps::writeGraph(QTextStream &out,
out << convertToXML(m_dir->displayName());
out << "\"/>";
out << "</div>" << endl;
- QString tmpstr;
- QTextOStream tmpout(&tmpstr);
- tmpout.setEncoding(tmpout.UnicodeUTF8);
+ QGString tmpstr;
+ FTextStream tmpout(&tmpstr);
+ //tmpout.setEncoding(tmpout.UnicodeUTF8);
convertMapFile(tmpout,absBaseName+".map",relPath,TRUE);
if (!tmpstr.isEmpty())
{
@@ -2783,7 +2782,7 @@ void generateGraphLegend(const char *path)
convertToQCString(dotFile.name()).data());
return;
}
- QTextStream dotText(&dotFile);
+ FTextStream dotText(&dotFile);
writeGraphHeader(dotText);
dotText << " Node9 [shape=\"box\",label=\"Inherited\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",fillcolor=\"grey75\",style=\"filled\" fontcolor=\"black\"];\n";
dotText << " Node10 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
@@ -2880,8 +2879,8 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
* \param context the scope in which this graph is found (for resolving links)
* \returns a string which is the HTML image map (without the \<map\>\</map\>)
*/
-QString getDotImageMapFromFile(const QString& inFile, const QString& outDir,
- const QCString &relPath,const QString &context)
+QCString getDotImageMapFromFile(const QCString& inFile, const QCString& outDir,
+ const QCString &relPath,const QCString &context)
{
QString outFile = inFile + ".map";
@@ -2903,14 +2902,14 @@ QString getDotImageMapFromFile(const QString& inFile, const QString& outDir,
return "";
}
- QString result;
- QTextOStream tmpout(&result);
- tmpout.setEncoding(tmpout.UnicodeUTF8);
+ QGString result;
+ FTextStream tmpout(&result);
+ //tmpout.setEncoding(tmpout.UnicodeUTF8);
convertMapFile(tmpout, absOutFile, relPath ,TRUE, context);
d.remove(outFile);
unsetDotFontPath();
- return result;
+ return result.data();
}
// end MDG mods
@@ -3125,7 +3124,7 @@ void DotGroupCollaboration::addCollaborationMember(
}
-QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat format,
+QCString DotGroupCollaboration::writeGraph( FTextStream &t, GraphOutputFormat format,
const char *path, const char *relPath,
bool writeImageMap) const
{
@@ -3143,8 +3142,8 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo
QFile dotfile(absBaseName+".dot");
if (dotfile.open(IO_WriteOnly))
{
- QTextStream tdot(&dotfile);
- tdot.setEncoding(tdot.UnicodeUTF8);
+ FTextStream tdot(&dotfile);
+ //tdot.setEncoding(tdot.UnicodeUTF8);
writeGraphHeader(tdot);
// clean write flags
@@ -3245,7 +3244,7 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo
return baseName;
}
-void DotGroupCollaboration::Edge::write( QTextStream &t ) const
+void DotGroupCollaboration::Edge::write( FTextStream &t ) const
{
const char* linkTypeColor[] = {
"darkorchid3"
@@ -3312,7 +3311,7 @@ bool DotGroupCollaboration::isTrivial() const
return m_usedNodes->count() <= 1;
}
-void DotGroupCollaboration::writeGraphHeader(QTextStream &t) const
+void DotGroupCollaboration::writeGraphHeader(FTextStream &t) const
{
t << "digraph structs" << endl;
t << "{" << endl;
@@ -3326,7 +3325,7 @@ void DotGroupCollaboration::writeGraphHeader(QTextStream &t) const
t << " rankdir=LR;\n";
}
-void writeDotDirDepGraph(QTextStream &t,DirDef *dd)
+void writeDotDirDepGraph(FTextStream &t,DirDef *dd)
{
t << "digraph G {\n";
if (Config_getBool("DOT_TRANSPARENT"))
diff --git a/src/dot.h b/src/dot.h
index 7d76c31..52e7e76 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -26,7 +26,7 @@
class ClassDef;
class FileDef;
-class QTextStream;
+class FTextStream;
class DotNodeList;
class ClassSDict;
class MemberDef;
@@ -72,12 +72,12 @@ class DotNode
void removeChild(DotNode *n);
void removeParent(DotNode *n);
int findParent( DotNode *n );
- void write(QTextStream &t,GraphType gt,GraphOutputFormat f,
+ void write(FTextStream &t,GraphType gt,GraphOutputFormat f,
bool topDown,bool toChildren,bool backArrows,bool reNumber);
int m_subgraphId;
void clearWriteFlag();
- void writeXML(QTextStream &t,bool isClassGraph);
- void writeDEF(QTextStream &t);
+ void writeXML(FTextStream &t,bool isClassGraph);
+ void writeDEF(FTextStream &t);
QCString label() const { return m_label; }
int number() const { return m_number; }
bool isVisible() const { return m_visible; }
@@ -86,9 +86,9 @@ class DotNode
private:
void colorConnectedNodes(int curColor);
- void writeBox(QTextStream &t,GraphType gt,GraphOutputFormat f,
+ void writeBox(FTextStream &t,GraphType gt,GraphOutputFormat f,
bool hasNonReachableChildren, bool reNumber=FALSE);
- void writeArrow(QTextStream &t,GraphType gt,GraphOutputFormat f,DotNode *cn,
+ void writeArrow(FTextStream &t,GraphType gt,GraphOutputFormat f,DotNode *cn,
EdgeInfo *ei,bool topDown, bool pointBack=TRUE, bool reNumber=FALSE);
void setDistance(int distance);
const DotNode *findDocNode() const; // only works for acyclic graphs!
@@ -139,7 +139,7 @@ class DotGfxHierarchyTable
public:
DotGfxHierarchyTable();
~DotGfxHierarchyTable();
- void writeGraph(QTextStream &t,const char *path) const;
+ void writeGraph(FTextStream &t,const char *path) const;
private:
void addHierarchy(DotNode *n,ClassDef *cd,bool hide);
@@ -159,11 +159,11 @@ class DotClassGraph
~DotClassGraph();
bool isTrivial() const;
bool isTooBig() const;
- QCString writeGraph(QTextStream &t,GraphOutputFormat f,const char *path,
+ QCString writeGraph(FTextStream &t,GraphOutputFormat f,const char *path,
const char *relPath, bool TBRank=TRUE,bool imageMap=TRUE) const;
- void writeXML(QTextStream &t);
- void writeDEF(QTextStream &t);
+ void writeXML(FTextStream &t);
+ void writeDEF(FTextStream &t);
QCString diskName() const;
private:
@@ -188,13 +188,13 @@ class DotInclDepGraph
public:
DotInclDepGraph(FileDef *fd,bool inverse);
~DotInclDepGraph();
- QCString writeGraph(QTextStream &t, GraphOutputFormat f,const char *path,
+ QCString writeGraph(FTextStream &t, GraphOutputFormat f,const char *path,
const char *relPath,
bool writeImageMap=TRUE) const;
bool isTrivial() const;
bool isTooBig() const;
QCString diskName() const;
- void writeXML(QTextStream &t);
+ void writeXML(FTextStream &t);
private:
void buildGraph(DotNode *n,FileDef *fd,int distance);
@@ -215,7 +215,7 @@ class DotCallGraph
public:
DotCallGraph(MemberDef *md,bool inverse);
~DotCallGraph();
- QCString writeGraph(QTextStream &t, GraphOutputFormat f,
+ QCString writeGraph(FTextStream &t, GraphOutputFormat f,
const char *path,const char *relPath,bool writeImageMap=TRUE) const;
void buildGraph(DotNode *n,MemberDef *md,int distance);
bool isTrivial() const;
@@ -241,7 +241,7 @@ class DotDirDeps
DotDirDeps(DirDef *dir);
~DotDirDeps();
bool isTrivial() const;
- QCString writeGraph(QTextStream &out,
+ QCString writeGraph(FTextStream &out,
GraphOutputFormat format,
const char *path,
const char *relPath,
@@ -284,12 +284,12 @@ class DotGroupCollaboration
EdgeType eType;
QList<Link> links;
- void write( QTextStream &t ) const;
+ void write( FTextStream &t ) const;
};
DotGroupCollaboration(GroupDef* gd);
~DotGroupCollaboration();
- QCString writeGraph(QTextStream &t, GraphOutputFormat format,
+ QCString writeGraph(FTextStream &t, GraphOutputFormat format,
const char *path,const char *relPath,
bool writeImageMap=TRUE) const;
void buildGraph(GroupDef* gd);
@@ -297,7 +297,7 @@ class DotGroupCollaboration
private :
void addCollaborationMember( Definition* def, QCString& url, EdgeType eType );
void addMemberList( class MemberList* ml );
- void writeGraphHeader(QTextStream &t) const;
+ void writeGraphHeader(FTextStream &t) const;
Edge* addEdge( DotNode* _pNStart, DotNode* _pNEnd, EdgeType _eType,
const QCString& _label, const QCString& _url );
@@ -338,9 +338,9 @@ void generateGraphLegend(const char *path);
void writeDotGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,GraphOutputFormat format);
-QString getDotImageMapFromFile(const QString& inFile, const QString& outDir,
- const QCString& relPath,const QString &context);
+QCString getDotImageMapFromFile(const QCString& inFile, const QCString& outDir,
+ const QCString& relPath,const QCString &context);
-void writeDotDirDepGraph(QTextStream &t,DirDef *dd);
+void writeDotDirDepGraph(FTextStream &t,DirDef *dd);
#endif
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index c07b2b7..2efc9ed 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -680,7 +680,7 @@ static void buildFileList(EntryNav *rootNav)
"the second argument in the \\file statement ",
root->name.data()
);
- if (ambig) // name is ambigious
+ if (ambig) // name is ambiguous
{
text+="matches the following input files:\n";
text+=showFileDefMatches(Doxygen::inputNameDict,root->name);
@@ -736,7 +736,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,Entry *root)
"the argument of the \\class, \\struct, \\union, or \\include command ",
includeFile.data()
);
- if (ambig) // name is ambigious
+ if (ambig) // name is ambiguous
{
text+="matches the following input files:\n";
text+=showFileDefMatches(Doxygen::inputNameDict,root->includeFile);
@@ -2072,7 +2072,7 @@ static MemberDef *addVariableToFile(
{
if (!root->type.isEmpty() && !root->name.isEmpty())
{
- if (name.at(0)=='@') // dummy variable representing annonymous union
+ if (name.at(0)=='@') // dummy variable representing anonymous union
def=root->type;
else
def=root->type+" "+name+root->args;
@@ -2479,8 +2479,8 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1)
{
MemberDef *md=0;
- // if cd is an annonymous scope we insert the member
- // into a non-annonymous scope as well. This is needed to
+ // if cd is an anonymous scope we insert the member
+ // into a non-anonymous scope as well. This is needed to
// be able to refer to it using \var or \fn
//int indentDepth=0;
@@ -4411,7 +4411,7 @@ static void findInheritedTemplateInstances()
for (;(rootNav=edi.current());++edi)
{
ClassDef *cd;
- // strip any annonymous scopes first
+ // strip any anonymous scopes first
QCString bName=stripAnonymousNamespaceScope(rootNav->name());
bName=stripTemplateSpecifiersFromScope(bName);
Debug::print(Debug::Classes,0," Inheritance: Class %s : \n",bName.data());
@@ -4434,7 +4434,7 @@ static void findUsedTemplateInstances()
for (;(rootNav=edi.current());++edi)
{
ClassDef *cd;
- // strip any annonymous scopes first
+ // strip any anonymous scopes first
QCString bName=stripAnonymousNamespaceScope(rootNav->name());
bName=stripTemplateSpecifiersFromScope(bName);
Debug::print(Debug::Classes,0," Usage: Class %s : \n",bName.data());
@@ -4460,7 +4460,7 @@ static void computeClassRelations()
rootNav->loadEntry(g_storage);
Entry *root = rootNav->entry();
- // strip any annonymous scopes first
+ // strip any anonymous scopes first
QCString bName=stripAnonymousNamespaceScope(rootNav->name());
bName=stripTemplateSpecifiersFromScope(bName);
Debug::print(Debug::Classes,0," Relations: Class %s : \n",bName.data());
@@ -4500,7 +4500,7 @@ static void computeTemplateClassRelations()
QCString bName=stripAnonymousNamespaceScope(root->name);
bName=stripTemplateSpecifiersFromScope(bName);
ClassDef *cd=getClass(bName);
- // strip any annonymous scopes first
+ // strip any anonymous scopes first
QDict<ClassDef> *templInstances = 0;
if (cd && (templInstances=cd->getTemplateInstances()))
{
@@ -7220,6 +7220,48 @@ static void addSourceReferences()
}
//----------------------------------------------------------------------------
+
+static void sortMemberLists()
+{
+ // sort class member lists
+ ClassSDict::Iterator cli(*Doxygen::classSDict);
+ ClassDef *cd=0;
+ for (cli.toFirst();(cd=cli.current());++cli)
+ {
+ cd->sortMemberLists();
+ }
+
+ // sort namespace member lists
+ NamespaceSDict::Iterator nli(*Doxygen::namespaceSDict);
+ NamespaceDef *nd=0;
+ for (nli.toFirst();(nd=nli.current());++nli)
+ {
+ nd->sortMemberLists();
+ }
+
+ // sort file member lists
+ FileNameListIterator fnli(*Doxygen::inputNameList);
+ FileName *fn;
+ for (;(fn=fnli.current());++fnli)
+ {
+ FileNameIterator fni(*fn);
+ FileDef *fd;
+ for (;(fd=fni.current());++fni)
+ {
+ fd->sortMemberLists();
+ }
+ }
+
+ // sort group member lists
+ GroupSDict::Iterator gli(*Doxygen::groupSDict);
+ GroupDef *gd;
+ for (gli.toFirst();(gd=gli.current());++gli)
+ {
+ gd->sortMemberLists();
+ }
+}
+
+//----------------------------------------------------------------------------
// generate the documentation of all classes
static void generateClassList(ClassSDict &classSDict)
@@ -8053,7 +8095,7 @@ static void buildExampleList(EntryNav *rootNav)
{
PageDef *pd=new PageDef(root->fileName,root->startLine,
root->name,root->brief+root->doc+root->inbodyDocs,root->args);
- pd->setFileName(convertNameToFile(pd->name()+"-example"));
+ pd->setFileName(convertNameToFile(pd->name()+"-example",FALSE,TRUE));
pd->addSectionsToDefinition(root->anchors);
//pi->addSections(root->anchors);
@@ -9445,7 +9487,7 @@ void readConfiguration(int argc, char **argv)
/* Perlmod wants to know the path to the config file.*/
QFileInfo configFileInfo(configName);
- setPerlModDoxyfile(configFileInfo.absFilePath());
+ setPerlModDoxyfile(configFileInfo.absFilePath().data());
}
@@ -10126,6 +10168,9 @@ void parseInput()
addListReferences();
generateXRefPages();
+ msg("Sorting member lists...\n");
+ sortMemberLists();
+
if (Config_getBool("SHOW_DIRECTORIES") && Config_getBool("DIRECTORY_GRAPH"))
{
msg("Computing dependencies between directories...\n");
@@ -10194,7 +10239,7 @@ void generateOutput()
if (generateEclipseHelp) Doxygen::indexList.addIndex(new EclipseHelp);
if (generateHtmlHelp) Doxygen::indexList.addIndex(new HtmlHelp);
if (generateQhp) Doxygen::indexList.addIndex(new Qhp);
- if (generateTreeView) Doxygen::indexList.addIndex(new FTVHelp);
+ if (generateTreeView) Doxygen::indexList.addIndex(new FTVHelp(TRUE));
if (generateDocSet) Doxygen::indexList.addIndex(new DocSets);
Doxygen::indexList.initialize();
Doxygen::indexList.addImageFile("tab_r.gif");
@@ -10398,6 +10443,7 @@ void generateOutput()
// FTVHelp::getInstance()->finalize();
//}
+ msg("finalizing index lists...\n");
Doxygen::indexList.finalize();
if (!Config_getString("GENERATE_TAGFILE").isEmpty())
@@ -10476,6 +10522,10 @@ void generateOutput()
portable_getSysElapsedTime()
);
}
+ else
+ {
+ msg("finished...\n");
+ }
/**************************************************************************
* Start cleaning up *
diff --git a/src/doxygen.css b/src/doxygen.css
index 28c5241..bbb8368 100644
--- a/src/doxygen.css
+++ b/src/doxygen.css
@@ -153,6 +153,15 @@ div.ah {
color: #ffffff;
margin-bottom: 3px;
margin-top: 3px
+ padding: .2em;
+ border: solid thin #333;
+ border-radius: .5em;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ -webkit-box-shadow: 2px 2px 3px #999;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+ background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
}
div.groupHeader {
@@ -325,6 +334,11 @@ hr.footer {
/* @group Member Descriptions */
+table.memberdecls {
+ border-spacing: 0px;
+ padding: 0px;
+}
+
.mdescLeft, .mdescRight,
.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
@@ -592,19 +606,19 @@ table.doxtable th {
list-style-type:none;
float:left;
padding-left:10px;
+ padding-right: 15px;
+ background-image:url('bc_s.png');
+ background-repeat:no-repeat;
+ background-position:right;
+ color:##45;
}
.navpath a
{
height:32px;
display:block;
- background-image:url('bc_s.png');
- background-repeat:no-repeat;
- background-position:right;
- padding-right: 15px;
text-decoration: none;
outline: none;
- color:##45;
}
.navpath a:hover
diff --git a/src/doxygen_css.h b/src/doxygen_css.h
index ff941b3..fc02e37 100644
--- a/src/doxygen_css.h
+++ b/src/doxygen_css.h
@@ -153,6 +153,15 @@
" color: #ffffff;\n"
" margin-bottom: 3px;\n"
" margin-top: 3px\n"
+" padding: .2em;\n"
+" border: solid thin #333;\n"
+" border-radius: .5em;\n"
+" -webkit-border-radius: .5em;\n"
+" -moz-border-radius: .5em;\n"
+" -webkit-box-shadow: 2px 2px 3px #999;\n"
+" -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;\n"
+" background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));\n"
+" background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);\n"
"}\n"
"\n"
"div.groupHeader {\n"
@@ -325,6 +334,11 @@
"\n"
"/* @group Member Descriptions */\n"
"\n"
+"table.memberdecls {\n"
+" border-spacing: 0px;\n"
+" padding: 0px;\n"
+"}\n"
+"\n"
".mdescLeft, .mdescRight,\n"
".memItemLeft, .memItemRight,\n"
".memTemplItemLeft, .memTemplItemRight, .memTemplParams {\n"
@@ -592,19 +606,19 @@
" list-style-type:none;\n"
" float:left;\n"
" padding-left:10px;\n"
+" padding-right: 15px;\n"
+" background-image:url('bc_s.png');\n"
+" background-repeat:no-repeat;\n"
+" background-position:right;\n"
+" color:##45;\n"
"}\n"
"\n"
".navpath a\n"
"{\n"
" height:32px;\n"
" display:block;\n"
-" background-image:url('bc_s.png');\n"
-" background-repeat:no-repeat;\n"
-" background-position:right;\n"
-" padding-right: 15px;\n"
" text-decoration: none;\n"
" outline: none;\n"
-" color:##45;\n"
"}\n"
"\n"
".navpath a:hover\n"
diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp
index 4451a2a..8abca03 100644
--- a/src/eclipsehelp.cpp
+++ b/src/eclipsehelp.cpp
@@ -76,7 +76,7 @@ void EclipseHelp::initialize()
// -- initialize its text stream
m_tocstream.setDevice(m_tocfile);
- m_tocstream.setEncoding(QTextStream::UnicodeUTF8);
+ //m_tocstream.setEncoding(FTextStream::UnicodeUTF8);
// -- write the opening tag
QCString title = Config_getString("PROJECT_NAME");
@@ -112,7 +112,7 @@ void EclipseHelp::finalize()
if (pluginFile.open(IO_WriteOnly))
{
QString docId = Config_getString("ECLIPSE_DOC_ID");
- QTextStream t(&pluginFile);
+ FTextStream t(&pluginFile);
t << "<plugin name=\"" << docId << "\" id=\"" << docId << "\"" << endl;
t << " version=\"1.0.0\" provider-name=\"Doxygen\">" << endl;
t << " <extension point=\"org.eclipse.help.toc\">" << endl;
diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h
index 9466a47..645292f 100644
--- a/src/eclipsehelp.h
+++ b/src/eclipsehelp.h
@@ -26,7 +26,7 @@
#include "qtbc.h"
#include "index.h"
-#include <qtextstream.h>
+#include "ftextstream.h"
/* -- forward declarations */
class QFile;
@@ -62,7 +62,7 @@ class EclipseHelp : public IndexIntf
bool m_endtag;
QFile * m_tocfile;
- QTextStream m_tocstream;
+ FTextStream m_tocstream;
QCString m_pathprefix;
/* -- avoid copying */
diff --git a/src/filedef.cpp b/src/filedef.cpp
index d81a5fb..7593834 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -1533,12 +1533,16 @@ void FileDef::addMemberToList(MemberList::ListType lt,MemberDef *md)
static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
MemberList *ml = createMemberList(lt);
- if (((ml->listType()&MemberList::declarationLists) && sortBriefDocs) ||
- ((ml->listType()&MemberList::documentationLists) && sortMemberDocs)
- )
+ ml->setNeedsSorting(
+ ((ml->listType()&MemberList::declarationLists) && sortBriefDocs) ||
+ ((ml->listType()&MemberList::documentationLists) && sortMemberDocs));
+ ml->append(md);
+#if 0
+ if (ml->needsSorting())
ml->inSort(md);
else
ml->append(md);
+#endif
if (lt&MemberList::documentationLists)
{
ml->setInFile(TRUE);
@@ -1546,6 +1550,16 @@ void FileDef::addMemberToList(MemberList::ListType lt,MemberDef *md)
if (ml->listType()&MemberList::declarationLists) md->setSectionList(this,ml);
}
+void FileDef::sortMemberLists()
+{
+ MemberList *ml = m_memberLists.first();
+ while (ml)
+ {
+ if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
+ ml = m_memberLists.next();
+ }
+}
+
MemberList *FileDef::getMemberList(MemberList::ListType lt) const
{
FileDef *that = (FileDef*)this;
diff --git a/src/filedef.h b/src/filedef.h
index 0ea156f..b79653d 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -153,6 +153,7 @@ class FileDef : public Definition
void combineUsingRelations();
bool generateSourceFile() const;
+ void sortMemberLists();
void addIncludeDependency(FileDef *fd,const char *incName,bool local,bool imported);
void addIncludedByDependency(FileDef *fd,const char *incName,bool local,bool imported);
diff --git a/src/formula.cpp b/src/formula.cpp
index b8d32cb..d0e3843 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -172,8 +172,8 @@ void FormulaList::generateBitmaps(const char *path)
int zoomFactor = Config_getInt("FORMULA_FONTSIZE");
if (zoomFactor<8 || zoomFactor>50) zoomFactor=10;
scaleFactor *= zoomFactor/10.0;
- int gx = (((int)((x2-x1)*scaleFactor))+3)&~2;
- int gy = (((int)((y2-y1)*scaleFactor))+3)&~2;
+ int gx = (((int)((x2-x1)*scaleFactor))+3)&~1;
+ int gy = (((int)((y2-y1)*scaleFactor))+3)&~1;
// Then we run ghostscript to convert the postscript to a pixmap
// The pixmap is a truecolor image, where only black and white are
// used.
diff --git a/src/ftextstream.cpp b/src/ftextstream.cpp
new file mode 100644
index 0000000..f72185f
--- /dev/null
+++ b/src/ftextstream.cpp
@@ -0,0 +1,259 @@
+#include "ftextstream.h"
+#include <qfile.h>
+
+//----------------------------------------------------------------------------
+
+class QGStringBuffer : public QIODevice
+{
+ public:
+ QGStringBuffer( QGString* str );
+ ~QGStringBuffer();
+ bool open( int m );
+ void close();
+ void flush();
+ uint size() const;
+ int at() const;
+ bool at( int pos );
+ int readBlock( char *, uint) { return -1; }
+ int writeBlock( const char *p, uint len );
+ int getch() { return -1; }
+ int putch( int ch );
+ int ungetch( int ) { return -1; }
+
+ protected:
+ QGString* m_str;
+
+ private: // Disabled copy constructor and operator=
+ QGStringBuffer( const QGStringBuffer & );
+ QGStringBuffer &operator=( const QGStringBuffer & );
+};
+
+QGStringBuffer::QGStringBuffer( QGString* str ) : m_str(str)
+{
+ //printf("QGStringBuffer::QGStringBuffer(%p)\n",str);
+}
+
+QGStringBuffer::~QGStringBuffer()
+{
+}
+
+bool QGStringBuffer::open( int m )
+{
+ if ( !m_str )
+ {
+#if defined(CHECK_STATE)
+ qWarning( "QGStringBuffer::open: No string" );
+#endif
+ return FALSE;
+ }
+ if ( isOpen() )
+ { // buffer already open
+#if defined(CHECK_STATE)
+ qWarning( "QGStringBuffer::open: Buffer already open" );
+#endif
+ return FALSE;
+ }
+ setMode( m );
+ if ( m & IO_Truncate )
+ { // truncate buffer
+ m_str->truncate( 0 );
+ }
+ if ( m & IO_Append )
+ { // append to end of buffer
+ ioIndex = m_str->length();
+ }
+ else
+ {
+ ioIndex = 0;
+ }
+ setState( IO_Open );
+ setStatus( 0 );
+ return TRUE;
+}
+
+void QGStringBuffer::close()
+{
+ if ( isOpen() )
+ {
+ setFlags( IO_Direct );
+ ioIndex = 0;
+ }
+}
+
+void QGStringBuffer::flush()
+{
+}
+
+uint QGStringBuffer::size() const
+{
+ return m_str ? m_str->length() : 0;
+}
+
+int QGStringBuffer::at() const
+{
+ return ioIndex;
+}
+
+bool QGStringBuffer::at( int pos )
+{
+#if defined(CHECK_STATE)
+ if ( !isOpen() )
+ {
+ qWarning( "QGStringBuffer::at: Buffer is not open" );
+ return FALSE;
+ }
+#endif
+ if ( (uint)pos >= m_str->length() )
+ {
+#if defined(CHECK_RANGE)
+ qWarning( "QGStringBuffer::at: Index %d out of range", pos );
+#endif
+ return FALSE;
+ }
+
+ ioIndex = pos;
+ return TRUE;
+}
+
+int QGStringBuffer::writeBlock( const char *p, uint len )
+{
+ //printf("QGStringBuffer::writeBlock(%p,%d) m_str=%p ioIndex=%d\n",p,len,
+ // m_str,ioIndex);
+ m_str->enlarge(ioIndex+len+1);
+ memcpy(m_str->data()+ioIndex,p,len);
+ ioIndex+=len;
+ m_str->data()[ioIndex]='\0';
+ m_str->setLen(ioIndex);
+ return len;
+}
+
+int QGStringBuffer::putch( int ch )
+{
+ //printf("QGStringBuffer::putch(%d) m_str=%p ioIndex=%d\n",
+ // ch,m_str,ioIndex);
+ m_str->enlarge(ioIndex+2);
+ m_str->data()[ioIndex] = (char)ch;
+ ioIndex++;
+ m_str->data()[ioIndex] = '\0';
+ m_str->setLen(ioIndex);
+ return ch;
+}
+
+
+//----------------------------------------------------------------------------
+
+FTextStream::FTextStream()
+{
+ m_dev = 0;
+ m_owndev = FALSE;
+}
+
+FTextStream::FTextStream( QIODevice *dev )
+{
+ m_dev = dev;
+ m_owndev = FALSE;
+}
+
+FTextStream::FTextStream( QGString *s )
+{
+ m_dev = new QGStringBuffer(s);
+ ((QGStringBuffer*)m_dev)->open( IO_WriteOnly );
+ m_owndev = TRUE;
+}
+
+FTextStream::FTextStream( FILE *fh )
+{
+ m_dev = new QFile;
+ ((QFile *)m_dev)->open( IO_WriteOnly, fh);
+}
+
+FTextStream::~FTextStream()
+{
+ if (m_owndev) delete m_dev;
+ m_dev = 0;
+}
+
+QIODevice *FTextStream::device() const
+{
+ return m_dev;
+}
+
+void FTextStream::setDevice( QIODevice *dev )
+{
+ if (m_owndev)
+ {
+ delete m_dev;
+ m_owndev = FALSE;
+ }
+ m_dev = dev;
+}
+
+void FTextStream::unsetDevice()
+{
+ setDevice(0);
+}
+
+FTextStream &FTextStream::output_int( ulong n, bool neg )
+{
+ char buf[20];
+ char *p = &buf[19];
+ *p = '\0';
+ if ( neg )
+ {
+ n = (ulong)(-(long)n);
+ }
+ do
+ {
+ *--p = ((int)(n%10)) + '0';
+ n /= 10;
+ } while ( n );
+ if ( neg ) *--p = '-';
+ return operator<<(p);
+}
+
+FTextStream &FTextStream::operator<<( signed short i )
+{
+ return output_int( i, i < 0 );
+}
+
+FTextStream &FTextStream::operator<<( unsigned short i )
+{
+ return output_int( i, FALSE );
+}
+
+FTextStream &FTextStream::operator<<( signed int i )
+{
+ return output_int( i, i < 0 );
+}
+
+FTextStream &FTextStream::operator<<( unsigned int i )
+{
+ return output_int( i, FALSE );
+}
+
+FTextStream &FTextStream::operator<<( signed long i )
+{
+ return output_int( i, i < 0 );
+}
+
+FTextStream &FTextStream::operator<<( unsigned long i )
+{
+ return output_int( i, FALSE );
+}
+
+FTextStream &FTextStream::operator<<( float f )
+{
+ return *this << (double)f;
+}
+
+FTextStream &FTextStream::operator<<( double d )
+{
+ char buf[64];
+ sprintf(buf,"%f",d);
+ return *this << buf;
+}
+
+
+
+
+
diff --git a/src/ftextstream.h b/src/ftextstream.h
new file mode 100644
index 0000000..63ef244
--- /dev/null
+++ b/src/ftextstream.h
@@ -0,0 +1,82 @@
+#ifndef FTEXTSTREAM_H
+#define FTEXTSTREAM_H
+
+#include "qtbc.h"
+#include "qiodevice.h"
+#include "qstring.h"
+#include "qgstring.h"
+#include <stdio.h>
+
+/** @brief Simplified and optimized version of QTextStream */
+class FTextStream
+{
+ public:
+ FTextStream();
+ FTextStream( QIODevice * );
+ FTextStream( QGString * );
+ FTextStream( FILE * );
+ virtual ~FTextStream();
+
+ QIODevice *device() const;
+ void setDevice( QIODevice * );
+ void unsetDevice();
+
+ FTextStream &operator<<( char );
+ FTextStream &operator<<( const char *);
+ FTextStream &operator<<( const QString & );
+ FTextStream &operator<<( const QCString & );
+ FTextStream &operator<<( signed short );
+ FTextStream &operator<<( unsigned short );
+ FTextStream &operator<<( signed int );
+ FTextStream &operator<<( unsigned int );
+ FTextStream &operator<<( signed long );
+ FTextStream &operator<<( unsigned long );
+ FTextStream &operator<<( float );
+ FTextStream &operator<<( double );
+
+ private:
+ QIODevice *m_dev;
+ bool m_owndev;
+ FTextStream &output_int( ulong n, bool neg );
+
+ private: // Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+ FTextStream( const FTextStream & );
+ FTextStream &operator=( const FTextStream & );
+#endif
+};
+
+inline FTextStream &FTextStream::operator<<( char c)
+{
+ m_dev->putch(c);
+ return *this;
+}
+
+inline FTextStream &FTextStream::operator<<( const char* s)
+{
+ uint len = qstrlen( s );
+ m_dev->writeBlock( s, len );
+ return *this;
+}
+
+inline FTextStream &FTextStream::operator<<( const QString & s)
+{
+ return operator<<(s.data());
+}
+
+inline FTextStream &FTextStream::operator<<( const QCString &s)
+{
+ return operator<<(s.data());
+}
+
+typedef FTextStream & (*FTSFUNC)(FTextStream &);// manipulator function
+
+inline FTextStream &operator<<( FTextStream &s, FTSFUNC f )
+{ return (*f)( s ); }
+
+inline FTextStream &endl( FTextStream & s)
+{
+ return s << '\n';
+}
+
+#endif // FTEXTSTREAM_H
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index 7e27b23..c23baed 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -433,7 +433,7 @@ void FTVHelp::addContentsItem(bool isDir,
static int folderId=1;
-void FTVHelp::generateIndent(QTextStream &t, FTVNode *n,int level)
+void FTVHelp::generateIndent(FTextStream &t, FTVNode *n,int level)
{
if (n->parent)
{
@@ -478,7 +478,7 @@ void FTVHelp::generateIndent(QTextStream &t, FTVNode *n,int level)
}
}
-void FTVHelp::generateLink(QTextStream &t,FTVNode *n)
+void FTVHelp::generateLink(FTextStream &t,FTVNode *n)
{
QCString *dest;
//printf("FTVHelp::generateLink(ref=%s,file=%s,anchor=%s\n",
@@ -492,7 +492,7 @@ void FTVHelp::generateLink(QTextStream &t,FTVNode *n)
if (!n->ref.isEmpty()) // link to entity imported via tag file
{
t << "<a class=\"elRef\" ";
- t << "doxygen=\"" << n->ref << ":";
+ t << "target=\"_blank\" doxygen=\"" << n->ref << ":";
if ((dest=Doxygen::tagDestinationDict[n->ref])) t << *dest << "/";
t << "\" ";
}
@@ -520,7 +520,7 @@ void FTVHelp::generateLink(QTextStream &t,FTVNode *n)
}
}
-void FTVHelp::generateTree(QTextStream &t, const QList<FTVNode> &nl,int level)
+void FTVHelp::generateTree(FTextStream &t, const QList<FTVNode> &nl,int level)
{
QCString spaces;
spaces.fill(' ',level*2+8);
@@ -574,100 +574,8 @@ void FTVHelp::generateTreeViewImages()
}
}
-void FTVHelp::generateTreeView(QString* OutString)
+void FTVHelp::generateScript(FTextStream &t)
{
- QCString fileName;
- QFile f;
- static bool searchEngine = Config_getBool("SEARCHENGINE");
- static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
-
- generateTreeViewImages();
-
- // If top level index, generate alternative index.html as a frame
- if (m_topLevelIndex)
- {
- fileName=Config_getString("HTML_OUTPUT")+"/index"+Doxygen::htmlFileExtension;
- f.setName(fileName);
- if (!f.open(IO_WriteOnly))
- {
- err("Cannot open file %s for writing!\n",fileName.data());
- return;
- }
- else
- {
- QTextStream t(&f);
-#if QT_VERSION >= 200
- t.setEncoding(QTextStream::UnicodeUTF8);
-#endif
- //t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n";
- t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
- t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n";
- t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
- t << "<title>";
- if (Config_getString("PROJECT_NAME").isEmpty())
- {
- t << "Doxygen Documentation";
- }
- else
- {
- t << Config_getString("PROJECT_NAME");
- }
- t << "</title>\n</head>" << endl;
- t << "<frameset cols=\"" << Config_getInt("TREEVIEW_WIDTH") << ",*\">" << endl;
- t << " <frame src=\"tree" << Doxygen::htmlFileExtension << "\" name=\"treefrm\"/>" << endl;
- t << " <frame src=\"main" << Doxygen::htmlFileExtension << "\" name=\"basefrm\"/>" << endl;
- t << " <noframes>" << endl;
- t << " <body>" << endl;
- t << " <a href=\"main" << Doxygen::htmlFileExtension << "\">Frames are disabled. Click here to go to the main page.</a>" << endl;
- t << " </body>" << endl;
- t << " </noframes>" << endl;
- t << "</frameset>" << endl;
- t << "</html>" << endl;
- f.close();
- }
- }
-
- // Generate tree view
- if (!OutString)
- OutString = new QString;
- QTextOStream t(OutString);
- t.setEncoding(QTextStream::UnicodeUTF8);
-
- if (m_topLevelIndex)
- {
- //if (searchEngine)
- //{
- // t << "<!-- This comment will put IE 6, 7 and 8 in quirks mode -->" << endl;
- //}
- t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
- t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
- t << " <head>\n";
- t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
- t << " <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n";
- t << " <meta http-equiv=\"Content-Language\" content=\"en\" />\n";
- if (searchEngine)
- {
- t << " <link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>" << endl;
- t << " <script type=\"text/javaScript\" src=\"search/search.js\"></script>" << endl;
- }
- t << " <link rel=\"stylesheet\" href=\"";
- QCString cssname=Config_getString("HTML_STYLESHEET");
- if (cssname.isEmpty())
- {
- t << "doxygen.css";
- }
- else
- {
- QFileInfo cssfi(cssname);
- if (!cssfi.exists())
- {
- err("Error: user specified HTML style sheet file does not exist!\n");
- }
- t << cssfi.fileName();
- }
- t << "\"/>" << endl;
- t << " <title>TreeView</title>\n";
- }
t << " <script type=\"text/javascript\">\n";
t << " <!-- // Hide script from old browsers\n";
t << " \n";
@@ -726,8 +634,112 @@ void FTVHelp::generateTreeView(QString* OutString)
t << "\n";
t << " // End script hiding --> \n";
t << " </script>\n";
- if (m_topLevelIndex)
+}
+
+void FTVHelp::generateTreeViewInline(FTextStream &t)
+{
+ generateScript(t);
+ t << " <div class=\"directory-alt\">\n";
+ t << " <br/>\n";
+ t << " <div style=\"display: block;\">\n";
+
+ generateTree(t,m_indentNodes[0],0);
+
+ t << " </div>\n";
+ t << " </div>\n";
+}
+
+
+void FTVHelp::generateTreeView()
+{
+ QCString fileName;
+ QFile f;
+ static bool searchEngine = Config_getBool("SEARCHENGINE");
+ static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
+ generateTreeViewImages();
+
+ fileName=Config_getString("HTML_OUTPUT")+"/index"+Doxygen::htmlFileExtension;
+ f.setName(fileName);
+ if (!f.open(IO_WriteOnly))
+ {
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ else
+ {
+ FTextStream t(&f);
+ //t << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\">\n";
+ t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
+ t << "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n";
+ t << "<meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
+ t << "<title>";
+ if (Config_getString("PROJECT_NAME").isEmpty())
+ {
+ t << "Doxygen Documentation";
+ }
+ else
+ {
+ t << Config_getString("PROJECT_NAME");
+ }
+ t << "</title>\n</head>" << endl;
+ t << "<frameset cols=\"" << Config_getInt("TREEVIEW_WIDTH") << ",*\">" << endl;
+ t << " <frame src=\"tree" << Doxygen::htmlFileExtension << "\" name=\"treefrm\"/>" << endl;
+ t << " <frame src=\"main" << Doxygen::htmlFileExtension << "\" name=\"basefrm\"/>" << endl;
+ t << " <noframes>" << endl;
+ t << " <body>" << endl;
+ t << " <a href=\"main" << Doxygen::htmlFileExtension << "\">Frames are disabled. Click here to go to the main page.</a>" << endl;
+ t << " </body>" << endl;
+ t << " </noframes>" << endl;
+ t << "</frameset>" << endl;
+ t << "</html>" << endl;
+ f.close();
+ }
+
+ // Generate tree view
+ fileName=Config_getString("HTML_OUTPUT")+"/tree"+Doxygen::htmlFileExtension;
+ f.setName(fileName);
+ if (!f.open(IO_WriteOnly))
{
+ err("Cannot open file %s for writing!\n",fileName.data());
+ return;
+ }
+ else
+ {
+ FTextStream t(&f);
+
+ //if (searchEngine)
+ //{
+ // t << "<!-- This comment will put IE 6, 7 and 8 in quirks mode -->" << endl;
+ //}
+ t << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
+ t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
+ t << " <head>\n";
+ t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=UTF-8\"/>\n";
+ t << " <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n";
+ t << " <meta http-equiv=\"Content-Language\" content=\"en\" />\n";
+ if (searchEngine)
+ {
+ t << " <link href=\"search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>" << endl;
+ t << " <script type=\"text/javaScript\" src=\"search/search.js\"></script>" << endl;
+ }
+ t << " <link rel=\"stylesheet\" href=\"";
+ QCString cssname=Config_getString("HTML_STYLESHEET");
+ if (cssname.isEmpty())
+ {
+ t << "doxygen.css";
+ }
+ else
+ {
+ QFileInfo cssfi(cssname);
+ if (!cssfi.exists())
+ {
+ err("Error: user specified HTML style sheet file does not exist!\n");
+ }
+ t << cssfi.fileName();
+ }
+ t << "\"/>" << endl;
+ t << " <title>TreeView</title>\n";
+ generateScript(t);
t << " </head>\n";
t << "\n";
t << " <body class=\"ftvtree\"";
@@ -793,41 +805,17 @@ void FTVHelp::generateTreeView(QString* OutString)
t << projName;
}
t << "</span></h3>\n";
- }
- else
- {
- t << " <div class=\"directory-alt\">\n";
- t << " <br/>\n";
- }
- t << " <div style=\"display: block;\">\n";
+ t << " <div style=\"display: block;\">\n";
- generateTree(t,m_indentNodes[0],0);
+ generateTree(t,m_indentNodes[0],0);
- t << " </div>\n";
- t << " </div>\n";
+ t << " </div>\n";
+ t << " </div>\n";
- if (m_topLevelIndex)
- {
t << " </body>\n";
t << "</html>\n";
- }
- if (m_topLevelIndex)
- {
- fileName=Config_getString("HTML_OUTPUT")+"/tree"+Doxygen::htmlFileExtension;
- f.setName(fileName);
- if (!f.open(IO_WriteOnly))
- {
- err("Cannot open file %s for writing!\n",fileName.data());
- return;
- }
- else
- {
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
- t << *OutString << endl;
- f.close();
- }
+ f.close();
}
}
diff --git a/src/ftvhelp.h b/src/ftvhelp.h
index 468fa3b..e843b3c 100644
--- a/src/ftvhelp.h
+++ b/src/ftvhelp.h
@@ -31,6 +31,7 @@
class QFile;
struct FTVNode;
+class FTextStream;
struct FTVImageInfo
{
@@ -71,7 +72,7 @@ extern FTVImageInfo image_info[];
class FTVHelp : public IndexIntf
{
public:
- FTVHelp(bool topLevelIndex = true);
+ FTVHelp(bool LTI);
~FTVHelp();
void initialize();
void finalize();
@@ -89,12 +90,14 @@ class FTVHelp : public IndexIntf
void addIndexFile(const char *) {}
void addImageFile(const char *) {}
void addStyleSheetFile(const char *) {}
- void generateTreeView(QString* = NULL);
+ void generateTreeView();
+ void generateTreeViewInline(FTextStream &t);
private:
+ void generateScript(FTextStream &t);
void generateTreeViewImages();
- void generateTree(QTextStream &t,const QList<FTVNode> &nl,int level);
- void generateIndent(QTextStream &t,FTVNode *n,int level);
- void generateLink(QTextStream &t,FTVNode *n);
+ void generateTree(FTextStream &t,const QList<FTVNode> &nl,int level);
+ void generateIndent(FTextStream &t,FTVNode *n,int level);
+ void generateLink(FTextStream &t,FTVNode *n);
QList<FTVNode> *m_indentNodes;
int m_indent;
bool m_topLevelIndex;
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 71e5082..f75cc94 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -1320,14 +1320,30 @@ void GroupDef::addMemberToList(MemberList::ListType lt,MemberDef *md)
static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
MemberList *ml = createMemberList(lt);
- if (((ml->listType()&MemberList::declarationLists) && sortBriefDocs) ||
- ((ml->listType()&MemberList::documentationLists) && sortMemberDocs)
- )
+ ml->setNeedsSorting(
+ ((ml->listType()&MemberList::declarationLists) && sortBriefDocs) ||
+ ((ml->listType()&MemberList::documentationLists) && sortMemberDocs));
+ ml->append(md);
+
+#if 0
+ if (ml->needsSorting())
ml->inSort(md);
else
ml->append(md);
+#endif
}
+void GroupDef::sortMemberLists()
+{
+ MemberList *ml = m_memberLists.first();
+ while (ml)
+ {
+ if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
+ ml = m_memberLists.next();
+ }
+}
+
+
MemberList *GroupDef::getMemberList(MemberList::ListType lt) const
{
GroupDef *that = (GroupDef*)this;
diff --git a/src/groupdef.h b/src/groupdef.h
index 3e8d188..3482d0f 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -82,6 +82,7 @@ class GroupDef : public Definition
void findSectionsInDocumentation();
void addListReferences();
+ void sortMemberLists();
bool visited; // number of times accessed for output - KPW
diff --git a/src/htmlattrib.h b/src/htmlattrib.h
index 6b7006c..ad0f0d8 100644
--- a/src/htmlattrib.h
+++ b/src/htmlattrib.h
@@ -18,8 +18,8 @@
/*! A Html option. A name, value pair */
struct HtmlAttrib
{
- QString name;
- QString value;
+ QCString name;
+ QCString value;
};
/*! @brief A list of Html attributes.
@@ -35,10 +35,10 @@ class HtmlAttribList : public QList<HtmlAttrib>
{ operator=(l); }
HtmlAttribList &operator=(const HtmlAttribList &l)
{ clear(); QList<HtmlAttrib>::operator=(l); return *this; }
- QString toString() const
+ QCString toString() const
{
HtmlAttribList *that = (HtmlAttribList *)this;
- QString result;
+ QCString result;
HtmlAttrib *attr=that->first();
while (attr)
{
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index c15d71a..b03fd68 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -129,7 +129,7 @@ static QString htmlAttribsToString(const HtmlAttribList &attribs)
//-------------------------------------------------------------------------
-HtmlDocVisitor::HtmlDocVisitor(QTextStream &t,CodeOutputInterface &ci,
+HtmlDocVisitor::HtmlDocVisitor(FTextStream &t,CodeOutputInterface &ci,
const char *langExt)
: DocVisitor(DocVisitor_Html), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_hide(FALSE), m_langExt(langExt)
@@ -308,7 +308,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
forceEndParagraph(s);
m_t << PREFRAG_START;
Doxygen::parserManager->getParser(m_langExt)
- ->parseCode(m_ci,s->context(),s->text().latin1(),
+ ->parseCode(m_ci,s->context(),s->text(),
s->isExample(),s->exampleFile());
m_t << PREFRAG_END;
forceStartParagraph(s);
@@ -405,7 +405,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,
inc->context(),
- inc->text().latin1(),
+ inc->text(),
inc->isExample(),
inc->exampleFile(),
0, // fd
@@ -425,7 +425,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,
inc->context(),
- inc->text().latin1(),
+ inc->text(),
inc->isExample(),
inc->exampleFile(), &fd);
m_t << PREFRAG_END;
@@ -464,7 +464,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
{
Doxygen::parserManager->getParser(m_langExt)
->parseCode(m_ci,op->context(),
- op->text().latin1(),op->isExample(),
+ op->text(),op->isExample(),
op->exampleFile());
}
pushEnabled();
@@ -951,9 +951,9 @@ void HtmlDocVisitor::visitPre(DocSection *s)
forceEndParagraph(s);
m_t << "<h" << s->level()+1 << ">";
m_t << "<a class=\"anchor\" id=\"" << s->anchor();
- m_t << "\">" << endl;
+ m_t << "\"></a>" << endl;
filter(convertCharEntitiesToUTF8(s->title().data()));
- m_t << "</a></h" << s->level()+1 << ">\n";
+ m_t << "</h" << s->level()+1 << ">\n";
}
void HtmlDocVisitor::visitPost(DocSection *s)
@@ -1502,15 +1502,15 @@ void HtmlDocVisitor::filterQuotedCdataAttr(const char* str)
}
}
-void HtmlDocVisitor::startLink(const QString &ref,const QString &file,
- const QString &relPath,const QString &anchor,
- const QString &tooltip)
+void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file,
+ const QCString &relPath,const QCString &anchor,
+ const QCString &tooltip)
{
QCString *dest;
if (!ref.isEmpty()) // link to entity imported via tag file
{
m_t << "<a class=\"elRef\" ";
- m_t << "doxygen=\"" << ref << ":";
+ m_t << "target=\"_blank\" doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) m_t << *dest << "/";
m_t << "\" ";
}
@@ -1552,42 +1552,42 @@ void HtmlDocVisitor::popEnabled()
delete v;
}
-void HtmlDocVisitor::writeDotFile(const QString &fileName,const QString &relPath,
- const QString &context)
+void HtmlDocVisitor::writeDotFile(const QCString &fileName,const QCString &relPath,
+ const QCString &context)
{
- QString baseName=fileName;
+ QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
- QString outDir = Config_getString("HTML_OUTPUT");
+ QCString outDir = Config_getString("HTML_OUTPUT");
writeDotGraphFromFile(fileName,outDir,baseName,BITMAP);
- QString mapName = baseName+".map";
- QString mapFile = fileName+".map";
+ QCString mapName = baseName+".map";
+ QCString mapFile = fileName+".map";
m_t << "<img src=\"" << relPath << baseName << "."
<< Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\""
<< baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl;
- QString imap = getDotImageMapFromFile(baseName,outDir,relPath.data(),context);
+ QCString imap = getDotImageMapFromFile(baseName,outDir,relPath,context);
m_t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">" << imap << "</map>" << endl;
}
-void HtmlDocVisitor::writeMscFile(const QString &fileName,const QString &relPath,
- const QString &context)
+void HtmlDocVisitor::writeMscFile(const QCString &fileName,const QCString &relPath,
+ const QCString &context)
{
- QString baseName=fileName;
+ QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
- QString outDir = Config_getString("HTML_OUTPUT");
+ QCString outDir = Config_getString("HTML_OUTPUT");
writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
- QString mapName = baseName+".map";
- QString mapFile = fileName+".map";
+ QCString mapName = baseName+".map";
+ QCString mapFile = fileName+".map";
m_t << "<img src=\"" << relPath << baseName << ".png\" alt=\""
<< baseName << "\" border=\"0\" usemap=\"#" << mapName << "\">" << endl;
- QString imap = getMscImageMapFromFile(fileName,outDir,relPath.data(),context);
+ QCString imap = getMscImageMapFromFile(fileName,outDir,relPath,context);
m_t << "<map name=\"" << mapName << "\" id=\"" << mapName << "\">" << imap << "</map>" << endl;
}
diff --git a/src/htmldocvisitor.h b/src/htmldocvisitor.h
index 586ef4f..b31247f 100644
--- a/src/htmldocvisitor.h
+++ b/src/htmldocvisitor.h
@@ -24,15 +24,14 @@
#include <qcstring.h>
class DocNode;
-class QTextStream;
+class FTextStream;
class CodeOutputInterface;
-class QString;
/*! @brief Concrete visitor implementation for HTML output. */
class HtmlDocVisitor : public DocVisitor
{
public:
- HtmlDocVisitor(QTextStream &t,CodeOutputInterface &ci,const char *langExt);
+ HtmlDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -133,12 +132,12 @@ class HtmlDocVisitor : public DocVisitor
void filter(const char *str);
void filterQuotedCdataAttr(const char* str);
- void startLink(const QString &ref,const QString &file,
- const QString &relPath,const QString &anchor,
- const QString &tooltip = QString::null);
+ void startLink(const QCString &ref,const QCString &file,
+ const QCString &relPath,const QCString &anchor,
+ const QCString &tooltip = "");
void endLink();
- void writeDotFile(const QString &fileName,const QString &relPath,const QString &context);
- void writeMscFile(const QString &fileName,const QString &relPath,const QString &context);
+ void writeDotFile(const QCString &fileName,const QCString &relPath,const QCString &context);
+ void writeMscFile(const QCString &fileName,const QCString &relPath,const QCString &context);
void pushEnabled();
void popEnabled();
@@ -150,7 +149,7 @@ class HtmlDocVisitor : public DocVisitor
// state variables
//--------------------------------------
- QTextStream &m_t;
+ FTextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_hide;
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 33f6bdc..a07619d 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -857,7 +857,7 @@ void HtmlGenerator::writeStyleSheetFile(QFile &file)
t << replaceColorMarkers(defaultStyleSheet);
}
-static void writeDefaultHeaderFile(QTextStream &t, const char *title,
+static void writeDefaultHeaderFile(FTextStream &t, const char *title,
const char *relPath,bool usePathCmd,
bool searchPage=FALSE)
{
@@ -929,8 +929,8 @@ static void writeDefaultHeaderFile(QTextStream &t, const char *title,
void HtmlGenerator::writeHeaderFile(QFile &file)
{
- QTextStream t(&file);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&file);
+ //t.setEncoding(QTextStream::UnicodeUTF8);
writeDefaultHeaderFile(t,"$title",relativePathToRoot(0),TRUE);
}
@@ -948,7 +948,7 @@ void HtmlGenerator::writeFooterFile(QFile &file)
<< "</html>\n";
}
-static void generateDynamicSections(QTextStream &t,const QCString &relPath)
+static void generateDynamicSections(FTextStream &t,const QCString &relPath)
{
if (Config_getBool("HTML_DYNAMIC_SECTIONS"))
{
@@ -1087,7 +1087,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
m_sectionCount=0;
}
-void HtmlGenerator::writeSearchFooter(QTextStream &t,const QCString &relPath)
+void HtmlGenerator::writeSearchFooter(FTextStream &t,const QCString &relPath)
{
(void)relPath;
t << "<!--- window showing the filter options -->\n";
@@ -1107,7 +1107,7 @@ void HtmlGenerator::writeSearchFooter(QTextStream &t,const QCString &relPath)
t << "\n";
}
-static void writePageFooter(QTextStream &t,const QCString &lastTitle,
+static void writePageFooter(FTextStream &t,const QCString &lastTitle,
const QCString relPath)
{
static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
@@ -1271,7 +1271,7 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f)
if (ref)
{
t << "<a class=\"elRef\" ";
- t << "doxygen=\"" << ref << ":";
+ t << "target=\"_blank\" doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" ";
}
@@ -1326,7 +1326,7 @@ void HtmlGenerator::writeObjectLink(const char *ref,const char *f,
if (ref)
{
t << "<a class=\"elRef\" ";
- t << "doxygen=\"" << ref << ":";
+ t << "target=\"_blank\" doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" ";
}
@@ -1359,7 +1359,7 @@ void HtmlGenerator::writeCodeLink(const char *ref,const char *f,
if (ref)
{
t << "<a class=\"codeRef\" ";
- t << "doxygen=\"" << ref << ":";
+ t << "target=\"_blank\" doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" ";
}
@@ -1435,12 +1435,11 @@ void HtmlGenerator::startSection(const char *lab,const char *,SectionInfo::Secti
case SectionInfo::Paragraph: t << "\n\n<h5>"; break;
default: ASSERT(0); break;
}
- t << "<a class=\"anchor\" id=\"" << lab << "\">";
+ t << "<a class=\"anchor\" id=\"" << lab << "\"></a>";
}
void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
{
- t << "</a>";
switch(type)
{
case SectionInfo::Page: t << "</h1>"; break;
@@ -1550,7 +1549,7 @@ void HtmlGenerator::writeChar(char c)
//--- helper function for dynamic sections -------------------------
-static void startSectionHeader(QTextStream &t,int sectionCount)
+static void startSectionHeader(FTextStream &t,int sectionCount)
{
static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
if (dynamicSections)
@@ -1567,12 +1566,12 @@ static void startSectionHeader(QTextStream &t,int sectionCount)
}
}
-static void endSectionHeader(QTextStream &t)
+static void endSectionHeader(FTextStream &t)
{
t << "</div>" << endl;
}
-static void startSectionSummary(QTextStream &t,int sectionCount)
+static void startSectionSummary(FTextStream &t,int sectionCount)
{
static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
if (dynamicSections)
@@ -1583,7 +1582,7 @@ static void startSectionSummary(QTextStream &t,int sectionCount)
}
}
-static void endSectionSummary(QTextStream &t)
+static void endSectionSummary(FTextStream &t)
{
static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
if (dynamicSections)
@@ -1592,7 +1591,7 @@ static void endSectionSummary(QTextStream &t)
}
}
-static void startSectionContent(QTextStream &t,int sectionCount)
+static void startSectionContent(FTextStream &t,int sectionCount)
{
static bool dynamicSections = Config_getBool("HTML_DYNAMIC_SECTIONS");
if (dynamicSections)
@@ -1607,7 +1606,7 @@ static void startSectionContent(QTextStream &t,int sectionCount)
}
}
-static void endSectionContent(QTextStream &t)
+static void endSectionContent(FTextStream &t)
{
t << "</div>" << endl;
}
@@ -1667,7 +1666,7 @@ void HtmlGenerator::endMemberList()
}
}
-// annonymous type:
+// anonymous type:
// 0 = single column right aligned
// 1 = double column left aligned
// 2 = single column left aligned
@@ -1756,7 +1755,7 @@ void HtmlGenerator::startMemberSections()
DBG_HTML(t << "<!-- startMemberSections -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
- t << "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">" << endl;
+ t << "<table class=\"memberdecls\">" << endl;
// HTML is not recursively decomposable, sorry
//t << "<tr><td></td></tr>" << endl;
}
@@ -2221,7 +2220,7 @@ void HtmlGenerator::printDoc(DocNode *n,const char *langExt)
//---------------- helpers for index generation -----------------------------
-static void startQuickIndexList(QTextStream &t,bool compact,bool topLevel=TRUE)
+static void startQuickIndexList(FTextStream &t,bool compact,bool topLevel=TRUE)
{
if (compact)
{
@@ -2241,7 +2240,7 @@ static void startQuickIndexList(QTextStream &t,bool compact,bool topLevel=TRUE)
}
}
-static void endQuickIndexList(QTextStream &t,bool compact)
+static void endQuickIndexList(FTextStream &t,bool compact)
{
if (compact)
{
@@ -2254,7 +2253,7 @@ static void endQuickIndexList(QTextStream &t,bool compact)
}
}
-static void startQuickIndexItem(QTextStream &t,const char *l,
+static void startQuickIndexItem(FTextStream &t,const char *l,
bool hl,bool /*compact*/,
const QCString &relPath)
{
@@ -2264,7 +2263,7 @@ static void startQuickIndexItem(QTextStream &t,const char *l,
t << "<span>";
}
-static void endQuickIndexItem(QTextStream &t)
+static void endQuickIndexItem(FTextStream &t)
{
t << "</span>";
t << "</a>";
@@ -2297,7 +2296,7 @@ static bool quickLinkVisible(LayoutNavEntry::Kind kind)
return FALSE;
}
-static void renderQuickLinksAsTree(QTextStream &t,const QCString &relPath,LayoutNavEntry *root)
+static void renderQuickLinksAsTree(FTextStream &t,const QCString &relPath,LayoutNavEntry *root)
{
QListIterator<LayoutNavEntry> li(root->children());
@@ -2327,7 +2326,7 @@ static void renderQuickLinksAsTree(QTextStream &t,const QCString &relPath,Layout
}
-static void renderQuickLinksAsTabs(QTextStream &t,const QCString &relPath,
+static void renderQuickLinksAsTabs(FTextStream &t,const QCString &relPath,
LayoutNavEntry *hlEntry,LayoutNavEntry::Kind kind,
bool highlightParent,bool highlightSearch)
{
@@ -2448,7 +2447,7 @@ static void renderQuickLinksAsTabs(QTextStream &t,const QCString &relPath,
}
}
-static void writeDefaultQuickLinks(QTextStream &t,bool compact,
+static void writeDefaultQuickLinks(FTextStream &t,bool compact,
HighlightedItem hli,const QCString &relPath)
{
LayoutNavEntry *root = LayoutDocManager::instance().rootNavEntry();
@@ -2535,8 +2534,8 @@ void HtmlGenerator::writeSearchPage()
QFile f(fileName);
if (f.open(IO_WriteOnly))
{
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(QTextStream::UnicodeUTF8);
if (g_header.isEmpty())
{
writeDefaultHeaderFile(t,theTranslator->trSearch().data(),0,FALSE,TRUE);
diff --git a/src/htmlgen.h b/src/htmlgen.h
index e795bf9..a3c0b81 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -25,6 +25,7 @@
#define PREFRAG_END "</pre></div>"
class QFile;
+class FTextStream;
class HtmlGenerator : public OutputGenerator
{
@@ -247,7 +248,7 @@ class HtmlGenerator : public OutputGenerator
{ t << "<a name=\"" << anchor << "\"></a>"; }
void linkableSymbol(int,const char *,Definition *,Definition *) {}
- static void writeSearchFooter(QTextStream &t,const QCString &relPath);
+ static void writeSearchFooter(FTextStream &t,const QCString &relPath);
static void writeSearchData(const char *dir);
//static void generateSectionImages();
diff --git a/src/index.cpp b/src/index.cpp
index 390fc55..b385d79 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -716,17 +716,20 @@ void writeHierarchicalIndex(OutputList &ol)
FTVHelp* ftv = 0;
bool treeView=Config_getBool("USE_INLINE_TREES");
if (treeView)
- ftv = new FTVHelp(false);
+ {
+ ftv = new FTVHelp(FALSE);
+ }
writeClassHierarchy(ol,ftv);
if (ftv)
{
- QString OutStr;
- ftv->generateTreeView(&OutStr);
+ QGString outStr;
+ FTextStream t(&outStr);
+ ftv->generateTreeViewInline(t);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeString(OutStr);
+ ol.writeString(outStr);
ol.popGeneratorState();
delete ftv;
}
@@ -2446,7 +2449,7 @@ static QCString searchId(const QCString &s)
else
{
char val[4];
- sprintf(val,"_%02x",c);
+ sprintf(val,"_%02x",(uchar)c);
result+=val;
}
}
@@ -2645,12 +2648,12 @@ void writeJavascriptSearchIndex()
QCString *dest = Doxygen::tagDestinationDict[d->getReference()];
if (dest && *dest=='.') // relative path (see bug 593679)
{
- t << "doxygen=\"" << d->getReference() << ":../"
+ t << "target=\"_blank\" doxygen=\"" << d->getReference() << ":../"
<< *dest << "/\" href=\"../" << *dest << "/";
}
else if (dest) // absolute path
{
- t << "doxygen=\"" << d->getReference() << ":"
+ t << "target=\"_blank\" doxygen=\"" << d->getReference() << ":"
<< *dest << "/\" href=\"" << *dest << "/";
}
}
@@ -2731,7 +2734,7 @@ void writeJavascriptSearchIndex()
if (!d->getReference().isEmpty())
{
QCString *dest;
- t << "doxygen=\"" << d->getReference() << ":../";
+ t << "target=\"_blank\" doxygen=\"" << d->getReference() << ":../";
if ((dest=Doxygen::tagDestinationDict[d->getReference()])) t << *dest << "/";
t << "\" ";
t << "href=\"../";
@@ -2919,7 +2922,7 @@ void writeJavascriptSearchIndex()
Doxygen::indexList.addStyleSheetFile("search/search.js");
}
-void writeSearchCategories(QTextStream &t)
+void writeSearchCategories(FTextStream &t)
{
static SearchIndexCategoryMapping map;
int i,j=0;
@@ -3525,7 +3528,7 @@ void writeGroupIndex(OutputList &ol)
bool treeView=Config_getBool("USE_INLINE_TREES");
if (treeView)
{
- ftv = new FTVHelp(false);
+ ftv = new FTVHelp(FALSE);
}
writeGroupHierarchy(ol,ftv);
@@ -3533,11 +3536,12 @@ void writeGroupIndex(OutputList &ol)
Doxygen::indexList.decContentsDepth();
if (ftv)
{
- QString OutStr;
- ftv->generateTreeView(&OutStr);
+ QGString outStr;
+ FTextStream t(&outStr);
+ ftv->generateTreeViewInline(t);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeString(OutStr);
+ ol.writeString(outStr);
ol.popGeneratorState();
delete ftv;
}
@@ -3571,17 +3575,20 @@ void writeDirIndex(OutputList &ol)
FTVHelp* ftv = 0;
bool treeView=Config_getBool("USE_INLINE_TREES");
if (treeView)
- ftv = new FTVHelp(false);
+ {
+ ftv = new FTVHelp(FALSE);
+ }
writeDirHierarchy(ol,ftv);
if (ftv)
{
- QString OutStr;
- ftv->generateTreeView(&OutStr);
+ QGString outStr;
+ FTextStream t(&outStr);
+ ftv->generateTreeViewInline(t);
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
- ol.writeString(OutStr);
+ ol.writeString(outStr);
ol.popGeneratorState();
delete ftv;
}
diff --git a/src/index.h b/src/index.h
index 065bfff..c5d1bb3 100644
--- a/src/index.h
+++ b/src/index.h
@@ -25,7 +25,7 @@
class Definition;
class MemberDef;
class OutputList;
-class QTextStream;
+class FTextStream;
/** \brief Abstract interface for index generators. */
class IndexIntf
@@ -268,6 +268,6 @@ void addNamespaceMemberNameToIndex(MemberDef *md);
// search engine
void writeJavascriptSearchIndex();
-void writeSearchCategories(QTextStream &t);
+void writeSearchCategories(FTextStream &t);
#endif
diff --git a/src/instdox.cpp b/src/instdox.cpp
index 6343cfd..a446a9a 100644
--- a/src/instdox.cpp
+++ b/src/instdox.cpp
@@ -110,7 +110,7 @@ void writeInstallScript()
t << " }\n";
t << " elsif ( ! $quiet && $sub ne \"_doc\" && $sub ne \"_cgi\" )\n";
t << " {\n";
- t << " print \"Substituting $subst{$sub} for each occurence of tag file $sub\\n\"; \n";
+ t << " print \"Substituting $subst{$sub} for each occurrence of tag file $sub\\n\"; \n";
t << " }\n";
t << "}\n";
t << "\n";
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 7897731..8e9c1bf 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -28,9 +28,9 @@
#include "msc.h"
#include "htmlattrib.h"
-static QString escapeLabelName(const char *s)
+static QCString escapeLabelName(const char *s)
{
- QString result;
+ QCString result;
const char *p=s;
char c;
while ((c=*p++))
@@ -73,9 +73,9 @@ static int rowspan(DocHtmlCell *cell)
return retval;
}
-QString LatexDocVisitor::escapeMakeIndexChars(const char *s)
+QCString LatexDocVisitor::escapeMakeIndexChars(const char *s)
{
- QString result;
+ QCString result;
const char *p=s;
char str[2]; str[1]=0;
char c;
@@ -96,7 +96,7 @@ QString LatexDocVisitor::escapeMakeIndexChars(const char *s)
}
-LatexDocVisitor::LatexDocVisitor(QTextStream &t,CodeOutputInterface &ci,
+LatexDocVisitor::LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci,
const char *langExt,bool insideTabbing)
: DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_insideItem(FALSE), m_hide(FALSE), m_insideTabbing(insideTabbing),
@@ -272,27 +272,27 @@ void LatexDocVisitor::visit(DocStyleChange *s)
void LatexDocVisitor::visit(DocVerbatim *s)
{
- static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
+ //static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
if (m_hide) return;
switch(s->type())
{
case DocVerbatim::Code:
- if (latexSourceCode)
- {
- m_t << "\n\n\\begin{footnotesize}\\begin{alltt}" << endl;
- }
- else
+ //if (latexSourceCode)
+ //{
+ // m_t << "\n\n\\begin{footnotesize}\\begin{alltt}" << endl;
+ //}
+ //else
{
m_t << "\n\\begin{DoxyCode}\n";
}
Doxygen::parserManager->getParser(m_langExt)
- ->parseCode(m_ci,s->context(),s->text().latin1(),
+ ->parseCode(m_ci,s->context(),s->text(),
s->isExample(),s->exampleFile());
- if (latexSourceCode)
- {
- m_t << "\\end{alltt}\\end{footnotesize}" << endl;
- }
- else
+ //if (latexSourceCode)
+ //{
+ // m_t << "\\end{alltt}\\end{footnotesize}" << endl;
+ //}
+ //else
{
m_t << "\\end{DoxyCode}\n";
}
@@ -389,7 +389,7 @@ void LatexDocVisitor::visit(DocInclude *inc)
FileDef fd( cfi.dirPath(), cfi.fileName() );
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
- inc->text().latin1(),
+ inc->text(),
inc->isExample(),
inc->exampleFile(), &fd);
m_t << "\\end{DoxyCodeInclude}" << endl;
@@ -399,7 +399,7 @@ void LatexDocVisitor::visit(DocInclude *inc)
m_t << "\n\\begin{DoxyCodeInclude}\n";
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
- inc->text().latin1(),inc->isExample(),
+ inc->text(),inc->isExample(),
inc->exampleFile());
m_t << "\\end{DoxyCodeInclude}\n";
break;
@@ -431,7 +431,7 @@ void LatexDocVisitor::visit(DocIncOperator *op)
if (!m_hide)
{
Doxygen::parserManager->getParser(m_langExt)
- ->parseCode(m_ci,op->context(),op->text().latin1(),
+ ->parseCode(m_ci,op->context(),op->text(),
op->isExample(),op->exampleFile());
}
pushEnabled();
@@ -948,7 +948,7 @@ void LatexDocVisitor::visitPre(DocImage *img)
m_t << "\n\\begin{DoxyImageNoCaption}\n"
" \\mbox{";
}
- QString gfxName = img->name();
+ QCString gfxName = img->name();
if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
{
gfxName=gfxName.left(gfxName.length()-4);
@@ -1062,7 +1062,7 @@ void LatexDocVisitor::visitPost(DocSecRefList *)
//void LatexDocVisitor::visitPre(DocLanguage *l)
//{
-// QString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QCString langId = Config_getEnum("OUTPUT_LANGUAGE");
// if (l->id().lower()!=langId.lower())
// {
// pushEnabled();
@@ -1072,7 +1072,7 @@ void LatexDocVisitor::visitPost(DocSecRefList *)
//
//void LatexDocVisitor::visitPost(DocLanguage *l)
//{
-// QString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QCString langId = Config_getEnum("OUTPUT_LANGUAGE");
// if (l->id().lower()!=langId.lower())
// {
// popEnabled();
@@ -1238,7 +1238,7 @@ void LatexDocVisitor::filter(const char *str)
filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem);
}
-void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
+void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) // internal PDF link
{
@@ -1269,7 +1269,7 @@ void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QSt
}
}
-void LatexDocVisitor::endLink(const QString &ref,const QString &file,const QString &anchor)
+void LatexDocVisitor::endLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
m_t << "}";
if (ref.isEmpty() && !Config_getBool("PDF_HYPERLINKS"))
@@ -1295,13 +1295,13 @@ void LatexDocVisitor::popEnabled()
delete v;
}
-void LatexDocVisitor::startDotFile(const QString &fileName,
- const QString &width,
- const QString &height,
+void LatexDocVisitor::startDotFile(const QCString &fileName,
+ const QCString &width,
+ const QCString &height,
bool hasCaption
)
{
- QString baseName=fileName;
+ QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
@@ -1315,8 +1315,8 @@ void LatexDocVisitor::startDotFile(const QString &fileName,
{
baseName=baseName.left(baseName.length()-4);
}
- QString outDir = Config_getString("LATEX_OUTPUT");
- QString name = fileName;
+ QCString outDir = Config_getString("LATEX_OUTPUT");
+ QCString name = fileName;
writeDotGraphFromFile(name,outDir,baseName,EPS);
if (hasCaption)
{
@@ -1358,15 +1358,15 @@ void LatexDocVisitor::endDotFile(bool hasCaption)
}
}
-void LatexDocVisitor::writeMscFile(const QString &baseName)
+void LatexDocVisitor::writeMscFile(const QCString &baseName)
{
- QString shortName = baseName;
+ QCString shortName = baseName;
int i;
if ((i=shortName.findRev('/'))!=-1)
{
shortName=shortName.right(shortName.length()-i-1);
}
- QString outDir = Config_getString("LATEX_OUTPUT");
+ QCString outDir = Config_getString("LATEX_OUTPUT");
writeMscGraphFromFile(baseName,outDir,baseName,MSC_EPS);
m_t << "\n\\begin{DoxyImageNoCaption}"
" \\mbox{\\includegraphics";
diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h
index 94037df..7b7a4d9 100644
--- a/src/latexdocvisitor.h
+++ b/src/latexdocvisitor.h
@@ -24,15 +24,14 @@
#include <qcstring.h>
#include <qmap.h>
-class QTextStream;
+class FTextStream;
class CodeOutputInterface;
-class QString;
/*! @brief Concrete visitor implementation for LaTeX output. */
class LatexDocVisitor : public DocVisitor
{
public:
- LatexDocVisitor(QTextStream &t,CodeOutputInterface &ci,
+ LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci,
const char *langExt,bool insideTabbing);
//--------------------------------------
@@ -137,15 +136,15 @@ class LatexDocVisitor : public DocVisitor
//--------------------------------------
void filter(const char *str);
- void startLink(const QString &ref,const QString &file,
- const QString &anchor);
- void endLink(const QString &ref,const QString &file,
- const QString &anchor);
- QString escapeMakeIndexChars(const char *s);
- void startDotFile(const QString &fileName,const QString &width,
- const QString &height, bool hasCaption);
+ void startLink(const QCString &ref,const QCString &file,
+ const QCString &anchor);
+ void endLink(const QCString &ref,const QCString &file,
+ const QCString &anchor);
+ QCString escapeMakeIndexChars(const char *s);
+ void startDotFile(const QCString &fileName,const QCString &width,
+ const QCString &height, bool hasCaption);
void endDotFile(bool hasCaption);
- void writeMscFile(const QString &fileName);
+ void writeMscFile(const QCString &fileName);
void pushEnabled();
void popEnabled();
@@ -154,7 +153,7 @@ class LatexDocVisitor : public DocVisitor
// state variables
//--------------------------------------
- QTextStream &m_t;
+ FTextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_insideItem;
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 3f72ff4..d848a97 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -92,7 +92,7 @@ void LatexGenerator::init()
QCString latex_command = Config_getString("LATEX_CMD_NAME");
QCString mkidx_command = Config_getString("MAKEINDEX_CMD_NAME");
// end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
- QTextStream t(&file);
+ FTextStream t(&file);
if (!Config_getBool("USE_PDFLATEX")) // use plain old latex
{
t << "all: clean refman.dvi" << endl
@@ -166,7 +166,7 @@ void LatexGenerator::init()
createSubDirs(d);
}
-static void writeDefaultHeaderPart1(QTextStream &t)
+static void writeDefaultHeaderPart1(FTextStream &t)
{
// part 1
@@ -267,7 +267,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
}
-static void writeDefaultHeaderPart2(QTextStream &t)
+static void writeDefaultHeaderPart2(FTextStream &t)
{
// part 2
t << "}\\\\" << endl
@@ -275,7 +275,7 @@ static void writeDefaultHeaderPart2(QTextStream &t)
<< "{\\large ";
}
-static void writeDefaultHeaderPart3(QTextStream &t)
+static void writeDefaultHeaderPart3(FTextStream &t)
{
// part 3
t << " Doxygen " << versionString << "}\\\\" << endl
@@ -296,7 +296,7 @@ static void writeDefaultHeaderPart3(QTextStream &t)
}
}
-static void writeDefaultStyleSheetPart1(QTextStream &t)
+static void writeDefaultStyleSheetPart1(FTextStream &t)
{
// part 1
t << "\\NeedsTeXFormat{LaTeX2e}\n"
@@ -329,13 +329,14 @@ static void writeDefaultStyleSheetPart1(QTextStream &t)
t << "\\rfoot[\\fancyplain{}{\\bfseries\\scriptsize%\n ";
}
-static void writeDefaultStyleSheetPart2(QTextStream &t)
+static void writeDefaultStyleSheetPart2(FTextStream &t)
{
t << "\\lfoot[]{\\fancyplain{}{\\bfseries\\scriptsize%\n ";
}
-static void writeDefaultStyleSheetPart3(QTextStream &t)
+static void writeDefaultStyleSheetPart3(FTextStream &t)
{
+ static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE");
t << "}}\n";
t << "\\cfoot{}\n\n";
t << "%---------- Internal commands used in this style file ----------------\n\n";
@@ -365,13 +366,27 @@ static void writeDefaultStyleSheetPart3(QTextStream &t)
" \\normalsize%\n"
"}\n\n";
t << "% Used by @code ... @endcode\n"
- "\\newenvironment{DoxyCode}{%\n"
- " \\footnotesize%\n"
- " \\verbatim%\n"
- "}{%\n"
- " \\endverbatim%\n"
- " \\normalsize%\n"
- "}\n\n";
+ "\\newenvironment{DoxyCode}{%\n";
+ if (latexSourceCode)
+ {
+ t << "\n\n\\begin{footnotesize}\\begin{alltt}%" << endl;
+ }
+ else
+ {
+ t << " \\footnotesize%\n"
+ " \\verbatim%\n";
+ }
+ t << "}{%\n";
+ if (latexSourceCode)
+ {
+ t << "\\end{alltt}\\end{footnotesize}%" << endl;
+ }
+ else
+ {
+ t << " \\endverbatim%\n"
+ " \\normalsize%\n";
+ }
+ t << "}\n\n";
t << "% Used by @example, @include, @includelineno and @dontinclude\n"
"\\newenvironment{DoxyCodeInclude}{%\n"
" \\DoxyCode%\n"
@@ -529,6 +544,11 @@ static void writeDefaultStyleSheetPart3(QTextStream &t)
" \\end{description}%\n"
" \\end{DoxyDesc}%\n"
"}\n\n";
+ t << "% is used for parameters within a detailed function description\n"
+ "\\newenvironment{DoxyParamCaption}{%\n"
+ " \\renewcommand{\\item}[2][]{##1 \\em ##2}%\n"
+ " }{%\n"
+ "}\n\n";
t << "% Used by return value lists\n"
"\\newenvironment{DoxyRetVals}[1]{%\n"
" \\begin{DoxyDesc}{#1}%\n"
@@ -628,7 +648,7 @@ static void writeDefaultStyleSheetPart3(QTextStream &t)
void LatexGenerator::writeHeaderFile(QFile &f)
{
- QTextStream t(&f);
+ FTextStream t(&f);
writeDefaultHeaderPart1(t);
t << "Your title here";
writeDefaultHeaderPart2(t);
@@ -638,8 +658,8 @@ void LatexGenerator::writeHeaderFile(QFile &f)
void LatexGenerator::writeStyleSheetFile(QFile &f)
{
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(QTextStream::UnicodeUTF8);
writeDefaultStyleSheetPart1(t);
QCString &projectName = Config_getString("PROJECT_NAME");
@@ -855,7 +875,7 @@ void LatexGenerator::startIndexSection(IndexSections is)
void LatexGenerator::endIndexSection(IndexSections is)
{
- static bool compactLatex = Config_getBool("COMPACT_LATEX");
+ //static bool compactLatex = Config_getBool("COMPACT_LATEX");
static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
static QCString latexHeader = Config_getString("LATEX_HEADER");
switch (is)
@@ -1082,9 +1102,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
}
}
-void LatexGenerator::writePageLink(const char *name, bool first)
+void LatexGenerator::writePageLink(const char *name, bool /*first*/)
{
- bool &compactLatex = Config_getBool("COMPACT_LATEX");
+ //bool &compactLatex = Config_getBool("COMPACT_LATEX");
// next is remove for bug615957
//if (compactLatex || first) t << "\\input" ; else t << "\\include";
t << "\\input" ;
@@ -1928,14 +1948,46 @@ void LatexGenerator::endParamList()
t << "\\end{Desc}" << endl;
}
-void LatexGenerator::startParameterType(bool first,const char *key)
+void LatexGenerator::startParameterList(bool openBracket)
+{
+ /* start of ParameterType ParameterName list */
+ if (openBracket) t << "(";
+ t << endl << "\\begin{DoxyParamCaption}" << endl;
+}
+
+
+void LatexGenerator::startParameterType(bool /*first*/,const char *key)
+{
+ t << "\\item[{";
+ t << key;
+// if (!first)
+// {
+// t << "\\/ " << key << " ";
+// }
+}
+
+void LatexGenerator::endParameterType()
{
- if (!first)
+ t << "}]";
+}
+
+void LatexGenerator::startParameterName(bool /*oneArgOnly*/)
+{
+ t << "{";
+}
+
+void LatexGenerator::endParameterName(bool last,bool /* emptyList */,bool closeBracket)
+{
+ t << "}" << endl;
+
+ if (last)
{
- t << "\\/ " << key << " ";
+ t << "\\end{DoxyParamCaption}" << endl;
+ if (closeBracket) t << ")";
}
}
+
void LatexGenerator::printDoc(DocNode *n,const char *langExt)
{
LatexDocVisitor *visitor = new LatexDocVisitor(t,*this,langExt,insideTabbing);
@@ -2025,27 +2077,27 @@ void LatexGenerator::escapeMakeIndexChars(const char *s)
void LatexGenerator::startCodeFragment()
{
- if (m_prettyCode)
- {
- t << endl << endl;
- t << "\\begin{footnotesize}\\begin{alltt}\n";
- }
- else
- {
+ //if (m_prettyCode)
+ //{
+ // t << endl << endl;
+ // t << "\\begin{footnotesize}\\begin{alltt}\n";
+ //}
+ //else
+ //{
t << "\n\\begin{DoxyCode}\n";
- }
+ //}
}
void LatexGenerator::endCodeFragment()
{
- if (m_prettyCode)
- {
- t << "\\end{alltt}\\end{footnotesize}" << endl;
- }
- else
- {
+ //if (m_prettyCode)
+ //{
+ // t << "\\end{alltt}\\end{footnotesize}" << endl;
+ //}
+ //else
+ //{
t << "\\end{DoxyCode}\n";
- }
+ //}
}
void LatexGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
diff --git a/src/latexgen.h b/src/latexgen.h
index 9e0078f..6ba7c79 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -217,10 +217,10 @@ class LatexGenerator : public OutputGenerator
void startMemberDocName(bool) {}
void endMemberDocName() {}
void startParameterType(bool,const char *);
- void endParameterType() {}
- void startParameterName(bool) {}
- void endParameterName(bool,bool,bool) {}
- void startParameterList(bool) {}
+ void endParameterType();
+ void startParameterName(bool);
+ void endParameterName(bool,bool,bool);
+ void startParameterList(bool);
void endParameterList() {}
void startConstraintList(const char *);
diff --git a/src/layout.h b/src/layout.h
index ba8089c..8d2c5fa 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -123,7 +123,7 @@ struct LayoutNavEntry
Dirs,
Examples
};
- LayoutNavEntry(LayoutNavEntry *parent,Kind k,bool vs,const QString &bf, const QString &tl,bool prepend=FALSE)
+ LayoutNavEntry(LayoutNavEntry *parent,Kind k,bool vs,const QCString &bf, const QCString &tl,bool prepend=FALSE)
: m_parent(parent), m_kind(k), m_visible(vs), m_baseFile(bf), m_title(tl)
{ m_children.setAutoDelete(TRUE);
if (parent) { if (prepend) parent->prependChild(this); else parent->addChild(this); }
diff --git a/src/libdoxygen.pro.in b/src/libdoxygen.pro.in
index ed1d643..52adf17 100644
--- a/src/libdoxygen.pro.in
+++ b/src/libdoxygen.pro.in
@@ -48,6 +48,7 @@ HEADERS = bufstr.h \
filedef.h \
filename.h \
formula.h \
+ ftextstream.h \
ftvhelp.h \
groupdef.h \
htags.h \
@@ -179,6 +180,7 @@ SOURCES = ce_lex.cpp \
filedef.cpp \
filename.cpp \
formula.cpp \
+ ftextstream.cpp \
ftvhelp.cpp \
fortrancode.cpp \
fortranscanner.cpp \
diff --git a/src/lodepng.h b/src/lodepng.h
index 545bb91..a86ab65 100644
--- a/src/lodepng.h
+++ b/src/lodepng.h
@@ -1120,7 +1120,7 @@ The meanings of the LodePNG error values:
*) 53: size of zlib data too small
*) 55: jumped past tree while generating huffman tree, this could be when the
tree will have more leaves than symbols after generating it out of the
- given lenghts. They call this an oversubscribed dynamic bit lengths tree in zlib.
+ given lengths. They call this an oversubscribed dynamic bit lengths tree in zlib.
*) 56: given output image colorType or bitDepth not supported for color conversion
*) 57: invalid CRC encountered (checking CRC can be disabled)
*) 58: invalid ADLER32 encountered (checking ADLER32 can be disabled)
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index 4a5cf61..b4886b6 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -28,7 +28,7 @@
#include <qfileinfo.h>
#include "parserintf.h"
-ManDocVisitor::ManDocVisitor(QTextStream &t,CodeOutputInterface &ci,
+ManDocVisitor::ManDocVisitor(FTextStream &t,CodeOutputInterface &ci,
const char *langExt)
: DocVisitor(DocVisitor_Man), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_firstCol(TRUE),
m_indent(0), m_langExt(langExt)
@@ -195,7 +195,7 @@ void ManDocVisitor::visit(DocVerbatim *s)
m_t << ".PP" << endl;
m_t << ".nf" << endl;
Doxygen::parserManager->getParser(0/*TODO*/)
- ->parseCode(m_ci,s->context(),s->text().latin1(),
+ ->parseCode(m_ci,s->context(),s->text(),
s->isExample(),s->exampleFile());
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
@@ -244,7 +244,7 @@ void ManDocVisitor::visit(DocInclude *inc)
FileDef fd( cfi.dirPath(), cfi.fileName() );
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
- inc->text().latin1(),
+ inc->text(),
inc->isExample(),
inc->exampleFile(), &fd);
if (!m_firstCol) m_t << endl;
@@ -259,7 +259,7 @@ void ManDocVisitor::visit(DocInclude *inc)
m_t << ".nf" << endl;
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
- inc->text().latin1(),inc->isExample(),
+ inc->text(),inc->isExample(),
inc->exampleFile());
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
@@ -304,7 +304,7 @@ void ManDocVisitor::visit(DocIncOperator *op)
if (!m_hide)
{
Doxygen::parserManager->getParser(0/*TODO*/)
- ->parseCode(m_ci,op->context(),op->text().latin1(),
+ ->parseCode(m_ci,op->context(),op->text(),
op->isExample(),op->exampleFile());
}
pushEnabled();
@@ -479,7 +479,7 @@ void ManDocVisitor::visitPre(DocTitle *)
void ManDocVisitor::visitPost(DocTitle *)
{
if (m_hide) return;
- m_t << "\\fP";
+ m_t << "\\fP" << endl;
m_t << ".RS 4" << endl;
}
diff --git a/src/mandocvisitor.h b/src/mandocvisitor.h
index 2ace4c6..5b7eebe 100644
--- a/src/mandocvisitor.h
+++ b/src/mandocvisitor.h
@@ -23,15 +23,14 @@
#include <qstack.h>
#include <qcstring.h>
-class QTextStream;
+class FTextStream;
class CodeOutputInterface;
-class QString;
/*! @brief Concrete visitor implementation for LaTeX output. */
class ManDocVisitor : public DocVisitor
{
public:
- ManDocVisitor(QTextStream &t,CodeOutputInterface &ci,const char *langExt);
+ ManDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -143,7 +142,7 @@ class ManDocVisitor : public DocVisitor
// state variables
//--------------------------------------
- QTextStream &m_t;
+ FTextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_hide;
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 67c389b..fc5f504 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -422,9 +422,9 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
{
if ( linkfile.open( IO_WriteOnly ) )
{
- QTextStream linkstream;
+ FTextStream linkstream;
linkstream.setDevice(&linkfile);
- linkstream.setEncoding(QTextStream::UnicodeUTF8);
+ //linkstream.setEncoding(QTextStream::UnicodeUTF8);
linkstream << ".so man" << getExtension() << "/" << buildFileName( manName ) << endl;
}
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 17eb795..e7fa89e 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -98,14 +98,19 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
//printf("writeDefArgList(%d)\n",defArgList->count());
ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
+ //ol.disableAllBut(OutputGenerator::Html);
+ bool htmlOn = ol.isEnabled(OutputGenerator::Html);
+ bool latexOn = ol.isEnabled(OutputGenerator::Latex);
{
- // html
+ // html and latex
+ if (htmlOn) ol.enable(OutputGenerator::Html);
+ if (latexOn) ol.enable(OutputGenerator::Latex);
ol.endMemberDocName();
ol.startParameterList(!md->isObjCMethod());
}
ol.enableAll();
ol.disable(OutputGenerator::Html);
+ ol.disable(OutputGenerator::Latex);
{
// other formats
if (!md->isObjCMethod()) ol.docify("("); // start argument list
@@ -202,12 +207,16 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
ol.docify(" ");
}
ol.disable(OutputGenerator::Man);
+ ol.disable(OutputGenerator::Latex);
ol.startEmphasis();
ol.enable(OutputGenerator::Man);
+ if (latexOn) ol.enable(OutputGenerator::Latex);
if (a->name.isEmpty()) ol.docify(a->type); else ol.docify(a->name);
ol.disable(OutputGenerator::Man);
+ ol.disable(OutputGenerator::Latex);
ol.endEmphasis();
ol.enable(OutputGenerator::Man);
+ if (latexOn) ol.enable(OutputGenerator::Latex);
}
if (!a->array.isEmpty())
{
@@ -260,13 +269,13 @@ static bool writeDefArgumentList(OutputList &ol,ClassDef *cd,
first=FALSE;
}
ol.pushGeneratorState();
- bool htmlOn = ol.isEnabled(OutputGenerator::Html);
ol.disable(OutputGenerator::Html);
+ ol.disable(OutputGenerator::Latex);
//if (!first) ol.writeString("&nbsp;");
if (!md->isObjCMethod()) ol.docify(")"); // end argument list
ol.enableAll();
- ol.disableAllBut(OutputGenerator::Html);
- if (!htmlOn) ol.disable(OutputGenerator::Html);
+ if (htmlOn) ol.enable(OutputGenerator::Html);
+ if (latexOn) ol.enable(OutputGenerator::Latex);
if (!md->isDefine())
{
if (first) ol.startParameterName(defArgList->count()<2);
@@ -355,7 +364,7 @@ class MemberDefImpl
NamespaceDef *nspace; // the namespace this member is in.
MemberDef *enumScope; // the enclosing scope, if this is an enum field
- MemberDef *annEnumType; // the annonymous enum that is the type of this member
+ MemberDef *annEnumType; // the anonymous enum that is the type of this member
MemberList *enumFields; // enumeration fields
MemberDef *redefines; // the members that this member redefines
@@ -449,7 +458,6 @@ class MemberDefImpl
bool docsForDefinition; // TRUE => documentation block is put before
// definition.
// FALSE => block is put before declaration.
-
ClassDef *category;
};
@@ -636,6 +644,9 @@ MemberDef::MemberDef(const char *df,int dl,
m_impl = new MemberDefImpl;
m_impl->init(this,t,a,e,p,v,s,r,mt,tal,al);
m_flushPending = FALSE;
+ m_isLinkableCached = 0;
+ m_isConstructorCached = 0;
+ m_isDestructorCached = 0;
}
void MemberDef::moveTo(Definition *scope)
@@ -653,6 +664,8 @@ void MemberDef::moveTo(Definition *scope)
{
m_impl->nspace = (NamespaceDef*)scope;
}
+ m_isLinkableCached = 0;
+ m_isConstructorCached = 0;
}
@@ -847,67 +860,87 @@ QCString MemberDef::anchor() const
return result;
}
-bool MemberDef::isLinkableInProject() const
+void MemberDef::_computeLinkableInProject()
{
+ makeResident();
static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
static bool extractStatic = Config_getBool("EXTRACT_STATIC");
- makeResident();
-
+ m_isLinkableCached = 2; // linkable
//printf("MemberDef::isLinkableInProject(name=%s)\n",name().data());
if (isHidden())
{
//printf("is hidden\n");
- return FALSE;
+ m_isLinkableCached = 1;
+ return;
}
if (m_impl->templateMaster)
{
//printf("has template master\n");
- return m_impl->templateMaster->isLinkableInProject();
+ m_isLinkableCached = m_impl->templateMaster->isLinkableInProject() ? 2 : 1;
}
if (name().isEmpty() || name().at(0)=='@')
{
//printf("name invalid\n");
- return FALSE; // not a valid or a dummy name
+ m_isLinkableCached = 1; // not a valid or a dummy name
+ return;
}
if (!hasDocumentation() && !isReference())
{
//printf("no docs or reference\n");
- return FALSE; // no documentation
+ m_isLinkableCached = 1; // no documentation
+ return;
}
if (m_impl->group && !m_impl->group->isLinkableInProject())
{
//printf("group but group not linkable!\n");
- return FALSE; // group but group not linkable
+ m_isLinkableCached = 1; // group but group not linkable
+ return;
}
if (!m_impl->group && m_impl->classDef && !m_impl->classDef->isLinkableInProject())
{
//printf("in a class but class not linkable!\n");
- return FALSE; // in class but class not linkable
+ m_isLinkableCached = 1; // in class but class not linkable
+ return;
}
if (!m_impl->group && m_impl->nspace && !m_impl->related && !m_impl->nspace->isLinkableInProject())
{
//printf("in a namespace but namespace not linkable!\n");
- return FALSE; // in namespace but namespace not linkable
+ m_isLinkableCached = 1; // in namespace but namespace not linkable
+ return;
}
if (!m_impl->group && !m_impl->nspace &&
!m_impl->related && !m_impl->classDef &&
m_impl->fileDef && !m_impl->fileDef->isLinkableInProject())
{
//printf("in a file but file not linkable!\n");
- return FALSE; // in file (and not in namespace) but file not linkable
+ m_isLinkableCached = 1; // in file (and not in namespace) but file not linkable
+ return;
}
if (m_impl->prot==Private && !extractPrivate && m_impl->mtype!=Friend)
{
//printf("private and invisible!\n");
- return FALSE; // hidden due to protection
+ m_isLinkableCached = 1; // hidden due to protection
+ return;
}
if (m_impl->stat && m_impl->classDef==0 && !extractStatic)
{
//printf("static and invisible!\n");
- return FALSE; // hidden due to staticness
+ m_isLinkableCached = 1; // hidden due to staticness
+ return;
}
//printf("linkable!\n");
- return TRUE; // linkable!
+ return; // linkable!
+}
+
+bool MemberDef::isLinkableInProject() const
+{
+ if (m_isLinkableCached==0)
+ {
+ MemberDef *that = (MemberDef*)this;
+ that->_computeLinkableInProject();
+ }
+ ASSERT(m_isLinkableCached>0);
+ return m_isLinkableCached==2;
}
bool MemberDef::isLinkable() const
@@ -1346,7 +1379,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
}
// *** write name
- if (!name().isEmpty() && name().at(0)!='@') // hide annonymous stuff
+ if (!name().isEmpty() && name().at(0)!='@') // hide anonymous stuff
{
//printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable());
if (!(name().isEmpty() || name().at(0)=='@') && // name valid
@@ -1595,7 +1628,7 @@ bool MemberDef::isDetailedSectionLinkable() const
bool staticFilter = getClassDef()!=0 || !isStatic() || extractStatic;
// only include members that are non-private unless EXTRACT_PRIVATE is
- // set to YES or the member is part of a group
+ // set to YES or the member is part of a group
bool privateFilter = (protection()!=Private || extractPrivate ||
m_impl->mtype==Friend
);
@@ -2537,6 +2570,7 @@ void MemberDef::setGroupDef(GroupDef *gd,Grouping::GroupPri_t pri,
m_impl->groupStartLine=startLine;
m_impl->groupHasDocs=hasDocs;
m_impl->groupMember=member;
+ m_isLinkableCached = 0;
}
void MemberDef::setEnumScope(MemberDef *md)
@@ -2550,6 +2584,7 @@ void MemberDef::setEnumScope(MemberDef *md)
m_impl->groupFileName=md->getGroupFileName();
m_impl->groupStartLine=md->getGroupStartLine();
m_impl->groupHasDocs=md->getGroupHasDocs();
+ m_isLinkableCached = 0;
}
}
@@ -2557,6 +2592,8 @@ void MemberDef::setMemberClass(ClassDef *cd)
{
makeResident();
m_impl->classDef=cd;
+ m_isLinkableCached = 0;
+ m_isConstructorCached = 0;
setOuterScope(cd);
}
@@ -2750,19 +2787,22 @@ Specifier MemberDef::virtualness(int count) const
return v;
}
-bool MemberDef::isConstructor() const
-{
+void MemberDef::_computeIsConstructor()
+{
makeResident();
+ m_isConstructorCached=1; // FALSE
if (m_impl->classDef)
{
if (m_impl->isDMember) // for D
{
- return name()=="this";
+ m_isConstructorCached = name()=="this" ? 2 : 1;
+ return;
}
else if (m_impl->fileDef &&
getLanguageFromFileName(m_impl->fileDef->name())==SrcLangExt_PHP)
{ // for PHP
- return name()=="__construct";
+ m_isConstructorCached = name()=="__construct" ? 2 : 1;
+ return;
}
else // for other languages
{
@@ -2770,35 +2810,61 @@ bool MemberDef::isConstructor() const
int i=locName.find('<');
if (i==-1) // not a template class
{
- return name()==locName;
+ m_isConstructorCached = name()==locName ? 2 : 1;
}
else
{
- return name()==locName.left(i);
+ m_isConstructorCached = name()==locName.left(i) ? 2 : 1;
}
+ return;
}
}
- else
- return FALSE;
}
-bool MemberDef::isDestructor() const
+bool MemberDef::isConstructor() const
{
+ if (m_isConstructorCached==0)
+ {
+ MemberDef *that = (MemberDef*)this;
+ that->_computeIsConstructor();
+ }
+ ASSERT(m_isConstructorCached>0);
+ return m_isConstructorCached==2;
+
+}
+
+void MemberDef::_computeIsDestructor()
+{
makeResident();
+ bool isDestructor;
if (m_impl->isDMember) // for D
{
- return name()=="~this";
+ isDestructor = name()=="~this";
}
else if (m_impl->fileDef &&
getLanguageFromFileName(m_impl->fileDef->name())==SrcLangExt_PHP)
{ // for PHP
- return name()=="__destruct";
+ isDestructor = name()=="__destruct";
}
else // other languages
{
- return (name().find('~')!=-1 || name().find('!')!=-1) // The ! is for C++/CLI
+ isDestructor =
+ (name().find('~')!=-1 || name().find('!')!=-1) // The ! is for C++/CLI
&& name().find("operator")==-1;
}
+ m_isDestructorCached = isDestructor ? 2 : 1;
+}
+
+bool MemberDef::isDestructor() const
+{
+ if (m_isDestructorCached==0)
+ {
+ MemberDef *that=(MemberDef*)this;
+ that->_computeIsDestructor();
+ }
+ ASSERT(m_isDestructorCached>0);
+ return m_isDestructorCached==2;
+
}
void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
@@ -3641,6 +3707,7 @@ void MemberDef::setMemberType(MemberType t)
{
makeResident();
m_impl->mtype=t;
+ m_isLinkableCached = 0;
}
void MemberDef::setDefinition(const char *d)
@@ -3653,12 +3720,16 @@ void MemberDef::setFileDef(FileDef *fd)
{
makeResident();
m_impl->fileDef=fd;
+ m_isLinkableCached = 0;
+ m_isConstructorCached = 0;
+ m_isDestructorCached = 0;
}
void MemberDef::setProtection(Protection p)
{
makeResident();
m_impl->prot=p;
+ m_isLinkableCached = 0;
}
void MemberDef::setMemberSpecifiers(int s)
@@ -3716,12 +3787,14 @@ void MemberDef::makeRelated()
{
makeResident();
m_impl->related = Related;
+ m_isLinkableCached = 0;
}
void MemberDef::makeForeign()
{
makeResident();
m_impl->related = Foreign;
+ m_isLinkableCached = 0;
}
void MemberDef::setHasDocumentedParams(bool b)
@@ -3758,6 +3831,8 @@ void MemberDef::setEnumClassScope(ClassDef *cd)
{
makeResident();
m_impl->classDef = cd;
+ m_isLinkableCached = 0;
+ m_isConstructorCached = 0;
}
void MemberDef::setDocumentedEnumValues(bool value)
@@ -3806,6 +3881,7 @@ void MemberDef::setTemplateMaster(MemberDef *mt)
{
makeResident();
m_impl->templateMaster=mt;
+ m_isLinkableCached = 0;
}
void MemberDef::setDocsForDefinition(bool b)
diff --git a/src/memberdef.h b/src/memberdef.h
index c68886e..4eebb0a 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -362,6 +362,9 @@ class MemberDef : public Definition
void unlock() const;
void saveToDisk() const;
void makeResident() const;
+ void _computeLinkableInProject();
+ void _computeIsConstructor();
+ void _computeIsDestructor();
static int s_indentLevel;
// disable copying of member defs
@@ -376,6 +379,9 @@ class MemberDef : public Definition
int m_cacheHandle;
off_t m_storagePos; // location where the item is stored in file (if impl==0)
bool m_flushPending;
+ uchar m_isLinkableCached; // 0 = not cached, 1=FALSE, 2=TRUE
+ uchar m_isConstructorCached; // 0 = not cached, 1=FALSE, 2=TRUE
+ uchar m_isDestructorCached; // 0 = not cached, 1=FALSE, 2=TRUE
};
#endif
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 379409c..cf0235e 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -39,6 +39,7 @@ MemberList::MemberList(ListType lt) : m_listType(lt)
m_numDocMembers=-1; // special value indicating that value needs to be computed
m_inGroup=FALSE;
m_inFile=FALSE;
+ m_needsSorting=FALSE;
}
MemberList::~MemberList()
@@ -221,7 +222,7 @@ bool MemberList::declVisible() const
}
}
}
- // if this is an anoymous enum and there are variables of this
+ // if this is an anonymous enum and there are variables of this
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (enumVars==0) // show enum here
{
@@ -307,7 +308,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
}
}
}
- // if this is an anoymous enum and there are variables of this
+ // if this is an anonymous enum and there are variables of this
// enum type (i.e. enumVars>0), then we do not show the enum here.
if (enumVars==0) // show enum here
{
@@ -631,6 +632,7 @@ void MemberList::marshal(StorageIntf *s)
marshalInt(s,m_numDocMembers);
marshalBool(s,m_inGroup);
marshalBool(s,m_inFile);
+ marshalBool(s,m_needsSorting);
if (memberGroupList==0)
{
marshalUInt(s,NULL_LIST); // null pointer representation
@@ -662,6 +664,7 @@ void MemberList::unmarshal(StorageIntf *s)
m_numDocMembers = unmarshalInt(s);
m_inGroup = unmarshalBool(s);
m_inFile = unmarshalBool(s);
+ m_needsSorting = unmarshalBool(s);
uint i,count = unmarshalUInt(s);
if (count==NULL_LIST) // empty list
{
@@ -733,6 +736,11 @@ QCString MemberList::listTypeAsString() const
return "";
}
+void MemberList::setNeedsSorting(bool b)
+{
+ m_needsSorting = b;
+}
+
//--------------------------------------------------------------------------
int MemberSDict::compareItems(GCI item1, GCI item2)
diff --git a/src/memberlist.h b/src/memberlist.h
index de5e907..d222a48 100644
--- a/src/memberlist.h
+++ b/src/memberlist.h
@@ -133,6 +133,7 @@ class MemberList : public QList<MemberDef>
int friendCount() const { ASSERT(m_numDecMembers!=-1); return m_friendCnt; }
int numDecMembers() const { ASSERT(m_numDecMembers!=-1); return m_numDecMembers; }
int numDocMembers() const { ASSERT(m_numDocMembers!=-1); return m_numDocMembers; }
+ bool needsSorting() const { return m_needsSorting; }
void countDecMembers(bool countEnumValues=FALSE);
void countDocMembers(bool countEnumValues=FALSE);
void writePlainDeclarations(OutputList &ol,
@@ -150,6 +151,7 @@ class MemberList : public QList<MemberDef>
void setInFile(bool inFile) { m_inFile=inFile; }
void addListReferences(Definition *def);
void findSectionsInDocumentation();
+ void setNeedsSorting(bool b);
MemberGroupList *getMemberGroupList() const { return memberGroupList; }
void marshal(StorageIntf *s);
@@ -170,6 +172,7 @@ class MemberList : public QList<MemberDef>
bool m_inGroup; // is this list part of a group definition
bool m_inFile; // is this list part of a file definition
ListType m_listType;
+ bool m_needsSorting;
};
class MemberListIterator : public QListIterator<MemberDef>
diff --git a/src/msc.cpp b/src/msc.cpp
index 14f41a4..72f9681 100644
--- a/src/msc.cpp
+++ b/src/msc.cpp
@@ -27,7 +27,7 @@
static const int maxCmdLine = 40960;
static bool convertMapFile(QTextStream &t,const char *mapName,const QCString relPath,
- const QString &context)
+ const QCString &context)
{
QFile f(mapName);
if (!f.open(IO_ReadOnly))
@@ -140,10 +140,10 @@ error:
QDir::setCurrent(oldDir);
}
-QString getMscImageMapFromFile(const QString& inFile, const QString& outDir,
- const QCString& relPath,const QString& context)
+QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir,
+ const QCString& relPath,const QCString& context)
{
- QString outFile = inFile + ".map";
+ QCString outFile = inFile + ".map";
// chdir to the output dir, so dot can find the font file.
QCString oldDir = convertToQCString(QDir::currentDirPath());
@@ -169,7 +169,7 @@ QString getMscImageMapFromFile(const QString& inFile, const QString& outDir,
QDir().remove(outFile);
QDir::setCurrent(oldDir);
- return result;
+ return result.data();
}
diff --git a/src/msc.h b/src/msc.h
index 4b1e904..cd2fdbe 100644
--- a/src/msc.h
+++ b/src/msc.h
@@ -25,8 +25,8 @@ enum MscOutputFormat { MSC_BITMAP , MSC_EPS };
void writeMscGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,MscOutputFormat format);
-QString getMscImageMapFromFile(const QString& inFile, const QString& outDir,
- const QCString& relPath,const QString& context);
+QCString getMscImageMapFromFile(const QCString& inFile, const QCString& outDir,
+ const QCString& relPath,const QCString& context);
#endif
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index ee0191c..98b4831 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -57,6 +57,7 @@ NamespaceDef::NamespaceDef(const char *df,int dl,
memberGroupSDict->setAutoDelete(TRUE);
visited=FALSE;
m_subGrouping=Config_getBool("SUBGROUPING");
+ m_isCSharp = df && getLanguageFromFileName(df)==SrcLangExt_CSharp;
}
NamespaceDef::~NamespaceDef()
@@ -882,15 +883,33 @@ void NamespaceDef::addMemberToList(MemberList::ListType lt,MemberDef *md)
static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
MemberList *ml = createMemberList(lt);
- if (((ml->listType()&MemberList::declarationLists) && sortBriefDocs) ||
- ((ml->listType()&MemberList::documentationLists) && sortMemberDocs)
- )
+ ml->setNeedsSorting(
+ ((ml->listType()&MemberList::declarationLists) && sortBriefDocs) ||
+ ((ml->listType()&MemberList::documentationLists) && sortMemberDocs));
+ ml->append(md);
+
+#if 0
+ if (ml->needsSorting())
ml->inSort(md);
else
ml->append(md);
+#endif
+
if (ml->listType()&MemberList::declarationLists) md->setSectionList(this,ml);
}
+void NamespaceDef::sortMemberLists()
+{
+ MemberList *ml = m_memberLists.first();
+ while (ml)
+ {
+ if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
+ ml = m_memberLists.next();
+ }
+}
+
+
+
MemberList *NamespaceDef::getMemberList(MemberList::ListType lt) const
{
NamespaceDef *that = (NamespaceDef*)this;
@@ -932,7 +951,7 @@ bool NamespaceDef::isLinkableInProject() const
return TRUE;
}
return !name().isEmpty() && name().at(i)!='@' && // not anonymous
- hasDocumentation() && // documented
+ (hasDocumentation() || m_isCSharp) && // documented
!isReference() && // not an external reference
!isHidden() && // not hidden
!isArtificial() && // or artificial
@@ -944,7 +963,6 @@ bool NamespaceDef::isLinkable() const
return isLinkableInProject() || isReference();
}
-
MemberDef * NamespaceDef::getMemberByName(const QCString &n) const
{
MemberDef *md = 0;
diff --git a/src/namespacedef.h b/src/namespacedef.h
index f5dda20..ac64576 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -67,6 +67,7 @@ class NamespaceDef : public Definition
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
void findSectionsInDocumentation();
+ void sortMemberLists();
virtual Definition *findInnerCompound(const char *name);
void addInnerCompound(Definition *d);
@@ -117,6 +118,7 @@ class NamespaceDef : public Definition
ClassSDict *classSDict;
NamespaceSDict *namespaceSDict;
bool m_subGrouping;
+ bool m_isCSharp;
};
class NamespaceList : public QList<NamespaceDef>
diff --git a/src/outputgen.cpp b/src/outputgen.cpp
index 0d19776..4e91156 100644
--- a/src/outputgen.cpp
+++ b/src/outputgen.cpp
@@ -26,10 +26,6 @@ OutputGenerator::OutputGenerator()
{
//printf("OutputGenerator::OutputGenerator()\n");
file=0;
- b.setBuffer(a);
- b.open( IO_WriteOnly );
- t.setDevice(&b);
- t.setEncoding(QTextStream::UnicodeUTF8);
active=TRUE;
genStack = new QStack<bool>;
genStack->setAutoDelete(TRUE);
@@ -57,55 +53,13 @@ void OutputGenerator::startPlainFile(const char *name)
err("Could not open file %s for writing\n",fileName.data());
exit(1);
}
- fs.setDevice(file);
+ t.setDevice(file);
}
void OutputGenerator::endPlainFile()
{
- bool converted=false;
- if (!encoding.isEmpty())
- {
- QByteArray enc(a.size()*4);
- void *cd = portable_iconv_open(encoding,"UTF-8");
- if (cd!=(void *)(-1))
- {
- size_t iLeft=a.size();
- size_t oLeft=enc.size();
- const char *inputPtr = a.data();
- char *outputPtr = enc.data();
- if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
- {
- enc.resize(enc.size()-oLeft);
- postProcess(enc);
- //printf("a.size()=%d enc.size()=%d iLeft=%d oLeft=%d enc2.size()=%d\n",
- // a.size(),enc.size(),iLeft,oLeft,enc2.size());
- fs.writeRawBytes(enc.data(),enc.size()) ; // write string buffer to file
- converted=TRUE;
- }
- portable_iconv_close(cd);
- }
- }
- if (!converted)
- {
- //printf("endPlainFile(%s)\n",file->name());
- fs.writeRawBytes(a.data(),a.size()) ; // write string buffer to file
- }
- b.close();
- delete file;
+ delete file;
file=0;
- a.resize(0);
- b.setBuffer(a);
- b.open(IO_WriteOnly);
- t.setDevice(&b);
-}
-
-QCString OutputGenerator::getContents() const
-{
- QCString s;
- s.resize(a.size()+1);
- memcpy(s.data(),a.data(),a.size());
- s.at(a.size())='\0';
- return s;
}
void OutputGenerator::pushGeneratorState()
diff --git a/src/outputgen.h b/src/outputgen.h
index 3331231..82b6c38 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -19,7 +19,7 @@
#define OUTPUTGEN_H
#include "qtbc.h"
-#include <qtextstream.h>
+#include "ftextstream.h"
#include <qbuffer.h>
#include <qfile.h>
#include <qstack.h>
@@ -287,12 +287,12 @@ class OutputGenerator : public BaseOutputDocInterface
virtual OutputGenerator *get(OutputType o) = 0;
void startPlainFile(const char *name);
void endPlainFile();
- QCString getContents() const;
+ //QCString getContents() const;
bool isEnabled() const { return active; }
void pushGeneratorState();
void popGeneratorState();
- void setEncoding(const QCString &enc) { encoding = enc; }
- virtual void postProcess(QByteArray &) { }
+ //void setEncoding(const QCString &enc) { encoding = enc; }
+ //virtual void postProcess(QByteArray &) { }
virtual void printDoc(DocNode *,const char *langExt) = 0;
@@ -406,15 +406,11 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endConstraintList() = 0;
protected:
- QTextStream fs;
- QByteArray a;
- QBuffer b;
- QTextStream t;
+ FTextStream t;
QFile *file;
QCString dir;
bool active;
QStack<bool> *genStack;
- QString encoding;
private:
OutputGenerator(const OutputGenerator &o);
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index 417cbf3..46fd91a 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -37,7 +37,7 @@ class PerlModOutputStream
{
public:
- QString m_s;
+ QCString m_s;
QTextStream *m_t;
PerlModOutputStream(QTextStream *t = 0) : m_t(t) { }
@@ -45,7 +45,6 @@ public:
void add(char c);
void add(const char *s);
void add(QCString &s);
- void add(QString &s);
void add(int n);
void add(unsigned int n);
};
@@ -74,14 +73,6 @@ void PerlModOutputStream::add(QCString &s)
m_s += s;
}
-void PerlModOutputStream::add(QString &s)
-{
- if (m_t != 0)
- (*m_t) << s;
- else
- m_s += s;
-}
-
void PerlModOutputStream::add(int n)
{
if (m_t != 0)
@@ -115,7 +106,7 @@ public:
inline void setPerlModOutputStream(PerlModOutputStream *os) { m_stream = os; }
inline PerlModOutput &openSave() { iopenSave(); return *this; }
- inline PerlModOutput &closeSave(QString &s) { icloseSave(s); return *this; }
+ inline PerlModOutput &closeSave(QCString &s) { icloseSave(s); return *this; }
inline PerlModOutput &continueBlock()
{
@@ -130,7 +121,6 @@ public:
inline PerlModOutput &add(char c) { m_stream->add(c); return *this; }
inline PerlModOutput &add(const char *s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(QCString &s) { m_stream->add(s); return *this; }
- inline PerlModOutput &add(QString &s) { m_stream->add(s); return *this; }
inline PerlModOutput &add(int n) { m_stream->add(n); return *this; }
inline PerlModOutput &add(unsigned int n) { m_stream->add(n); return *this; }
@@ -169,7 +159,7 @@ public:
protected:
void iopenSave();
- void icloseSave(QString &);
+ void icloseSave(QCString &);
void incIndent();
void decIndent();
@@ -198,7 +188,7 @@ void PerlModOutput::iopenSave()
m_stream = new PerlModOutputStream();
}
-void PerlModOutput::icloseSave(QString &s)
+void PerlModOutput::icloseSave(QCString &s)
{
s = m_stream->m_s;
delete m_stream;
@@ -389,8 +379,8 @@ private:
// helper functions
//--------------------------------------
- void addLink(const QString &ref, const QString &file,
- const QString &anchor);
+ void addLink(const QCString &ref, const QCString &file,
+ const QCString &anchor);
void enterText();
void leaveText();
@@ -410,7 +400,7 @@ private:
PerlModOutput &m_output;
bool m_textmode;
bool m_textblockstart;
- QString m_other;
+ QCString m_other;
};
PerlModDocVisitor::PerlModDocVisitor(PerlModOutput &output)
@@ -426,9 +416,9 @@ void PerlModDocVisitor::finish()
.add(m_other);
}
-void PerlModDocVisitor::addLink(const QString &,const QString &file,const QString &anchor)
+void PerlModDocVisitor::addLink(const QCString &,const QCString &file,const QCString &anchor)
{
- QString link = file;
+ QCString link = file;
if (!anchor.isEmpty())
(link += "_1") += anchor;
m_output.addFieldQuotedString("link", link);
@@ -499,7 +489,7 @@ void PerlModDocVisitor::closeOther()
// Using a secondary text stream will corrupt the perl file. Instead of
// printing doc => [ data => [] ], it will print doc => [] data => [].
/*
- QString other;
+ QCString other;
leaveText();
m_output.closeSave(other);
m_other += other;
@@ -656,7 +646,7 @@ void PerlModDocVisitor::visit(DocVerbatim *s)
void PerlModDocVisitor::visit(DocAnchor *anc)
{
- QString anchor = anc->file() + "_1" + anc->anchor();
+ QCString anchor = anc->file() + "_1" + anc->anchor();
openItem("anchor");
m_output.addFieldQuotedString("id", anchor);
closeItem();
@@ -722,7 +712,7 @@ void PerlModDocVisitor::visit(DocIncOperator *)
void PerlModDocVisitor::visit(DocFormula *f)
{
openItem("formula");
- QString id;
+ QCString id;
id += f->id();
m_output.addFieldQuotedString("id", id).addFieldQuotedString("content", f->text());
closeItem();
@@ -867,7 +857,7 @@ void PerlModDocVisitor::visitPost(DocSimpleListItem *) { closeSubBlock(); }
void PerlModDocVisitor::visitPre(DocSection *s)
{
- QString sect = QString("sect%1").arg(s->level());
+ QCString sect = QCString().sprintf("sect%d",s->level());
openItem(sect);
openSubBlock("content");
}
@@ -1366,10 +1356,10 @@ static const char *getVirtualnessName(Specifier virt)
return 0;
}
-static QString pathDoxyfile;
-static QString pathDoxyExec;
+static QCString pathDoxyfile;
+static QCString pathDoxyExec;
-void setPerlModDoxyfile(const QString &qs)
+void setPerlModDoxyfile(const QCString &qs)
{
pathDoxyfile = qs;
pathDoxyExec = QDir::currentDirPath();
@@ -1381,18 +1371,18 @@ public:
PerlModOutput m_output;
- QString pathDoxyStructurePM;
- QString pathDoxyDocsTex;
- QString pathDoxyFormatTex;
- QString pathDoxyLatexTex;
- QString pathDoxyLatexDVI;
- QString pathDoxyLatexPDF;
- QString pathDoxyStructureTex;
- QString pathDoxyDocsPM;
- QString pathDoxyLatexPL;
- QString pathDoxyLatexStructurePL;
- QString pathDoxyRules;
- QString pathMakefile;
+ QCString pathDoxyStructurePM;
+ QCString pathDoxyDocsTex;
+ QCString pathDoxyFormatTex;
+ QCString pathDoxyLatexTex;
+ QCString pathDoxyLatexDVI;
+ QCString pathDoxyLatexPDF;
+ QCString pathDoxyStructureTex;
+ QCString pathDoxyDocsPM;
+ QCString pathDoxyLatexPL;
+ QCString pathDoxyLatexStructurePL;
+ QCString pathDoxyRules;
+ QCString pathMakefile;
inline PerlModGenerator(bool pretty) : m_output(pretty) { }
@@ -2353,7 +2343,7 @@ bool PerlModGenerator::generateDoxyRules()
return false;
bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
- QString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
+ QCString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
QTextStream doxyRulesStream(&doxyRules);
doxyRulesStream <<
@@ -2450,7 +2440,7 @@ bool PerlModGenerator::generateMakefile()
return false;
bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
- QString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
+ QCString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
QTextStream makefileStream(&makefile);
makefileStream <<
diff --git a/src/perlmodgen.h b/src/perlmodgen.h
index 66ea8a5..6885ad7 100644
--- a/src/perlmodgen.h
+++ b/src/perlmodgen.h
@@ -15,9 +15,9 @@
#ifndef PERLMODGEN_H
#define PERLMODGEN_H
-class QString;
+class QCString;
-extern void setPerlModDoxyfile(const QString &);
+extern void setPerlModDoxyfile(const QCString &);
extern void generatePerlMod();
#endif
diff --git a/src/pre.l b/src/pre.l
index 1f8316f..784c8b2 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1500,7 +1500,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
if ((g_includeStack.isEmpty() || g_curlyCount>0) &&
g_macroExpansion &&
(def=g_fileDefineDict->find(yytext)) &&
- macroIsAccessible(def) &&
+ (def->isPredefined || macroIsAccessible(def)) &&
(!g_expandOnlyPredef || def->isPredefined)
)
{
@@ -1509,7 +1509,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_defArgsStr=yytext;
if (def->nargs==-1) // no function macro
{
- QCString result = expandMacro(g_defArgsStr);
+ QCString result = def->isPredefined ? def->definition : expandMacro(g_defArgsStr);
outputArray(result,result.length());
}
else // zero or more arguments
@@ -1525,19 +1525,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<CopyLine>{ID} {
Define *def=0;
- //printf("Search for define %s\n",yytext);
if ((g_includeStack.isEmpty() || g_curlyCount>0) &&
g_macroExpansion &&
(def=g_fileDefineDict->find(yytext)) &&
def->nargs==-1 &&
- macroIsAccessible(def) &&
+ (def->isPredefined || macroIsAccessible(def)) &&
(!g_expandOnlyPredef || def->isPredefined)
)
{
- //printf("Found it!\n");
- QCString name=yytext;
- QCString result=expandMacro(name);
- //printf("result=`%s'\n",result.data());
+ QCString result=def->isPredefined ? def->definition : expandMacro(yytext);
outputArray(result,result.length());
}
else
diff --git a/src/qhpxmlwriter.h b/src/qhpxmlwriter.h
index 33e6152..c88eebd 100644
--- a/src/qhpxmlwriter.h
+++ b/src/qhpxmlwriter.h
@@ -18,7 +18,7 @@
#define QHPXMLWRITER_H
#include <qstring.h>
-#include <qtextstream.h>
+#include "ftextstream.h"
class QFile;
@@ -52,8 +52,8 @@ class QhpXmlWriter
char const * const * attributes = 0);
void closePure(char const * elementName);
- QString m_backend;
- QTextOStream m_out;
+ QGString m_backend;
+ FTextStream m_out;
int m_indentLevel;
bool m_curLineIndented;
bool m_compress;
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 9824311..a713b40 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -33,16 +33,16 @@
//#define DBG_RTF(x) m_t << x
#define DBG_RTF(x) do {} while(0)
-RTFDocVisitor::RTFDocVisitor(QTextStream &t,CodeOutputInterface &ci,
+RTFDocVisitor::RTFDocVisitor(FTextStream &t,CodeOutputInterface &ci,
const char *langExt)
: DocVisitor(DocVisitor_RTF), m_t(t), m_ci(ci), m_insidePre(FALSE),
m_hide(FALSE), m_indentLevel(0), m_lastIsPara(FALSE), m_langExt(langExt)
{
}
-QString RTFDocVisitor::getStyle(const char *name)
+QCString RTFDocVisitor::getStyle(const char *name)
{
- QString n;
+ QCString n;
n.sprintf("%s%d",name,m_indentLevel);
StyleData *sd = rtf_Style[n];
ASSERT(sd!=0);
@@ -333,7 +333,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
Doxygen::parserManager->getParser(m_langExt)
- ->parseCode(m_ci,s->context(),s->text().latin1(),
+ ->parseCode(m_ci,s->context(),s->text(),
s->isExample(),s->exampleFile());
//m_t << "\\par" << endl;
m_t << "}" << endl;
@@ -408,7 +408,7 @@ void RTFDocVisitor::visit(DocAnchor *anc)
{
if (m_hide) return;
DBG_RTF("{\\comment RTFDocVisitor::visit(DocAnchor)}\n");
- QString anchor;
+ QCString anchor;
if (!anc->file().isEmpty())
{
anchor+=anc->file();
@@ -441,7 +441,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
FileDef fd( cfi.dirPath(), cfi.fileName() );
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
- inc->text().latin1(),
+ inc->text(),
inc->isExample(),
inc->exampleFile(), &fd);
m_t << "\\par";
@@ -454,7 +454,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << rtf_Style_Reset << getStyle("CodeExample");
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
- inc->text().latin1(),inc->isExample(),
+ inc->text(),inc->isExample(),
inc->exampleFile());
m_t << "\\par";
m_t << "}" << endl;
@@ -497,7 +497,7 @@ void RTFDocVisitor::visit(DocIncOperator *op)
if (!m_hide)
{
Doxygen::parserManager->getParser(m_langExt)
- ->parseCode(m_ci,op->context(),op->text().latin1(),
+ ->parseCode(m_ci,op->context(),op->text(),
op->isExample(),op->exampleFile());
}
pushEnabled();
@@ -750,7 +750,7 @@ void RTFDocVisitor::visitPre(DocSection *s)
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{{" // start section
<< rtf_Style_Reset;
- QString heading;
+ QCString heading;
int level = QMIN(s->level()+1,4);
heading.sprintf("Heading%d",level);
// set style
@@ -1017,7 +1017,7 @@ void RTFDocVisitor::visitPre(DocHtmlHeader *header)
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocHtmlHeader)}\n");
m_t << "{" // start section
<< rtf_Style_Reset;
- QString heading;
+ QCString heading;
int level = QMIN(header->level()+2,4);
heading.sprintf("Heading%d",level);
// set style
@@ -1146,7 +1146,7 @@ void RTFDocVisitor::visitPost(DocSecRefList *)
//void RTFDocVisitor::visitPre(DocLanguage *l)
//{
// DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocLanguage)}\n");
-// QString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QCString langId = Config_getEnum("OUTPUT_LANGUAGE");
// if (l->id().lower()!=langId.lower())
// {
// pushEnabled();
@@ -1157,7 +1157,7 @@ void RTFDocVisitor::visitPost(DocSecRefList *)
//void RTFDocVisitor::visitPost(DocLanguage *l)
//{
// DBG_RTF("{\\comment RTFDocVisitor::visitPost(DocLanguage)}\n");
-// QString langId = Config_getEnum("OUTPUT_LANGUAGE");
+// QCString langId = Config_getEnum("OUTPUT_LANGUAGE");
// if (l->id().lower()!=langId.lower())
// {
// popEnabled();
@@ -1269,7 +1269,7 @@ void RTFDocVisitor::visitPre(DocXRefItem *x)
m_t << "{" << rtf_Style["Heading5"]->reference << endl;
if (Config_getBool("RTF_HYPERLINKS") && !anonymousEnum)
{
- QString refName;
+ QCString refName;
if (!x->file().isEmpty())
{
refName+=x->file();
@@ -1405,11 +1405,11 @@ void RTFDocVisitor::filter(const char *str,bool verbatim)
}
}
-void RTFDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
+void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS"))
{
- QString refName;
+ QCString refName;
if (!file.isEmpty())
{
refName+=file;
@@ -1432,7 +1432,7 @@ void RTFDocVisitor::startLink(const QString &ref,const QString &file,const QStri
m_lastIsPara=FALSE;
}
-void RTFDocVisitor::endLink(const QString &ref)
+void RTFDocVisitor::endLink(const QCString &ref)
{
if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS"))
{
@@ -1458,15 +1458,15 @@ void RTFDocVisitor::popEnabled()
delete v;
}
-void RTFDocVisitor::writeDotFile(const QString &fileName)
+void RTFDocVisitor::writeDotFile(const QCString &fileName)
{
- QString baseName=fileName;
+ QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
- QString outDir = Config_getString("RTF_OUTPUT");
+ QCString outDir = Config_getString("RTF_OUTPUT");
writeDotGraphFromFile(fileName,outDir,baseName,BITMAP);
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{" << endl;
@@ -1478,15 +1478,15 @@ void RTFDocVisitor::writeDotFile(const QString &fileName)
m_lastIsPara=TRUE;
}
-void RTFDocVisitor::writeMscFile(const QString &fileName)
+void RTFDocVisitor::writeMscFile(const QCString &fileName)
{
- QString baseName=fileName;
+ QCString baseName=fileName;
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
- QString outDir = Config_getString("RTF_OUTPUT");
+ QCString outDir = Config_getString("RTF_OUTPUT");
writeMscGraphFromFile(fileName,outDir,baseName,MSC_BITMAP);
if (!m_lastIsPara) m_t << "\\par" << endl;
m_t << "{" << endl;
diff --git a/src/rtfdocvisitor.h b/src/rtfdocvisitor.h
index 5d8af10..db7e28b 100644
--- a/src/rtfdocvisitor.h
+++ b/src/rtfdocvisitor.h
@@ -23,15 +23,14 @@
#include <qstack.h>
#include <qcstring.h>
-class QTextStream;
+class FTextStream;
class CodeOutputInterface;
-class QString;
/*! @brief Concrete visitor implementation for RTF output. */
class RTFDocVisitor : public DocVisitor
{
public:
- RTFDocVisitor(QTextStream &t,CodeOutputInterface &ci,const char *langExt);
+ RTFDocVisitor(FTextStream &t,CodeOutputInterface &ci,const char *langExt);
//--------------------------------------
// visitor functions for leaf nodes
@@ -135,23 +134,23 @@ class RTFDocVisitor : public DocVisitor
//--------------------------------------
void filter(const char *str,bool verbatim=FALSE);
- void startLink(const QString &ref,const QString &file,
- const QString &anchor);
- void endLink(const QString &ref);
- QString getStyle(const char *name);
+ void startLink(const QCString &ref,const QCString &file,
+ const QCString &anchor);
+ void endLink(const QCString &ref);
+ QCString getStyle(const char *name);
void incIndentLevel();
void decIndentLevel();
void pushEnabled();
void popEnabled();
- void writeDotFile(const QString &fileName);
- void writeMscFile(const QString &fileName);
+ void writeDotFile(const QCString &fileName);
+ void writeMscFile(const QCString &fileName);
//--------------------------------------
// state variables
//--------------------------------------
- QTextStream &m_t;
+ FTextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_hide;
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 6ef321c..1ab36ce 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -38,6 +38,7 @@
#include "docparser.h"
#include "dirdef.h"
#include "vhdldocgen.h"
+#include "portable.h"
//#define DBG_RTF(x) x;
#define DBG_RTF(x)
@@ -325,7 +326,7 @@ void RTFGenerator::beginRTFSection()
void RTFGenerator::startFile(const char *name,const char *,const char *)
{
- setEncoding(QCString().sprintf("CP%s",theTranslator->trRTFansicp().data()));
+ //setEncoding(QCString().sprintf("CP%s",theTranslator->trRTFansicp()));
QCString fileName=name;
relPath = relativePathToRoot(fileName);
@@ -2219,11 +2220,61 @@ void RTFGenerator::endMemberSubtitle()
// }
//}
//
+
+// note: function is not reentrant!
+static void encodeForOutput(FTextStream &t,const QCString &s)
+{
+ QCString encoding;
+ bool converted=FALSE;
+ int l = s.length();
+ static QByteArray enc;
+ if (l*4>(int)enc.size()) enc.resize(l*4); // worst case
+ encoding.sprintf("CP%s",theTranslator->trRTFansicp().data());
+ if (!encoding.isEmpty())
+ {
+ // convert from UTF-8 back to the output encoding
+ void *cd = portable_iconv_open(encoding,"UTF-8");
+ if (cd!=(void *)(-1))
+ {
+ size_t iLeft=l;
+ size_t oLeft=enc.size();
+ const char *inputPtr = s.data();
+ char *outputPtr = enc.data();
+ if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft))
+ {
+ enc.resize(enc.size()-oLeft);
+ converted=TRUE;
+ }
+ portable_iconv_close(cd);
+ }
+ }
+ if (!converted) // if we did not convert anything, copy as is.
+ {
+ memcpy(enc.data(),s.data(),l);
+ enc.resize(l);
+ }
+ uint i;
+ for (i=0;i<enc.size();i++)
+ {
+ uchar c = (uchar)enc.at(i);
+ if (c>=0x80)
+ {
+ char esc[10];
+ sprintf(esc,"\\'%X",c);
+ t << esc;
+ }
+ else
+ {
+ t << (char)c;
+ }
+ }
+}
+
/**
* VERY brittle routine inline RTF's included by other RTF's.
* it is recursive and ugly.
*/
-static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncludeHeader=TRUE)
+static bool preProcessFile(QDir &d,QCString &infName, FTextStream &t, bool bIncludeHeader=TRUE)
{
QFile f(infName);
if (!f.open(IO_ReadOnly))
@@ -2246,11 +2297,10 @@ static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncl
err("ERROR - read error in %s before end of RTF header!\n",infName.data());
return FALSE;
}
- if (bIncludeHeader) t << lineBuf;
+ if (bIncludeHeader) encodeForOutput(t,lineBuf);
} while (lineBuf.find("\\comment begin body")==-1);
- //while (fgets(buffer,sizeof(buffer),infp) != NULL)
while (f.readLine(lineBuf.data(),maxLineLength)!=-1)
{
int pos;
@@ -2260,18 +2310,18 @@ static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncl
int endNamePos = lineBuf.find('"',startNamePos);
QCString fileName = lineBuf.mid(startNamePos,endNamePos-startNamePos);
DBG_RTF(t << "{\\comment begin include " << fileName << "}" << endl)
- if (!PreProcessFile(d,fileName,t,FALSE)) return FALSE;
+ if (!preProcessFile(d,fileName,t,FALSE)) return FALSE;
DBG_RTF(t << "{\\comment end include " << fileName << "}" << endl)
}
- else
+ else // no INCLUDETEXT on this line
{
// elaborate hoopla to skip the final "}" if we didn't include the
// headers
if (!f.atEnd() || bIncludeHeader)
{
- t << lineBuf;
+ encodeForOutput(t,lineBuf);
}
- else
+ else // last line of included file
{
// null terminate at the last '}'
//char *str = strrchr(buffer,'}');
@@ -2281,7 +2331,7 @@ static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncl
lineBuf.at(pos) = '\0';
else
err("Strange, the last char was not a '}'\n");
- t << lineBuf;
+ encodeForOutput(t,lineBuf);
}
}
}
@@ -2460,10 +2510,9 @@ bool RTFGenerator::preProcessFileInplace(const char *path,const char *name)
err("Failed to open %s for writing!\n",combinedName.data());
return FALSE;
}
- QTextStream outt(&outf);
- outt.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream outt(&outf);
- if (!PreProcessFile(thisDir,mainRTFName,outt))
+ if (!preProcessFile(thisDir,mainRTFName,outt))
{
// it failed, remove the temp file
outf.close();
@@ -2620,6 +2669,7 @@ void RTFGenerator::rtfwriteRuler_thin()
t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl;
}
+#if 0
void RTFGenerator::postProcess(QByteArray &a)
{
QByteArray enc(a.size()*4); // worst case
@@ -2648,6 +2698,7 @@ void RTFGenerator::postProcess(QByteArray &a)
enc.resize(off);
a = enc;
}
+#endif
void RTFGenerator::startConstraintList(const char *header)
{
diff --git a/src/rtfgen.h b/src/rtfgen.h
index a32a097..ce92d53 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -46,7 +46,7 @@ class RTFGenerator : public OutputGenerator
void writeFooter() {}
void endFile();
void clearBuffer();
- void postProcess(QByteArray &);
+ //void postProcess(QByteArray &);
void startIndexSection(IndexSections);
void endIndexSection(IndexSections);
diff --git a/src/scanner.l b/src/scanner.l
index 7501855..0eecb14 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -160,7 +160,7 @@ static QCString briefBackup;
static bool g_inputFromFile;
static int docBlockContext;
-static QCString docBlock;
+static QGString docBlock;
static QCString docBlockName;
static bool docBlockInBody;
static bool docBlockAutoBrief;
@@ -3172,8 +3172,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
if (msName.isEmpty() && !current->name.isEmpty())
{
// see if the compound does not have a name or is inside another
- // annonymous compound. If so we insert a
- // special `annonymous' variable.
+ // anonymous compound. If so we insert a
+ // special `anonymous' variable.
//Entry *p=current_root;
Entry *p=current;
while (p)
@@ -3186,8 +3186,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
int pi = (i==-1) ? 0 : i+2;
if (p->name.at(pi)=='@')
{
- // annonymous compound inside -> insert dummy variable name
- //printf("Adding annonymous variable for scope %s\n",p->name.data());
+ // anonymous compound inside -> insert dummy variable name
+ //printf("Adding anonymous variable for scope %s\n",p->name.data());
msName.sprintf("@%d",anonCount++);
break;
}
@@ -4569,7 +4569,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
else
BEGIN( CopyArgComment );
}
-<CSConstraintType,CSConstraintName>"#" { // artifically inserted token to signal end of comment block
+<CSConstraintType,CSConstraintName>"#" { // artificially inserted token to signal end of comment block
current->typeConstr->last()->docs = fullArgString;
}
<CSConstraintType>"{" { // end of type constraint reached
@@ -5126,14 +5126,14 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
}
<DocLine>[^\n]*/"\n" { // whole line
docBlock+=yytext;
- handleCommentBlock(docBlock,current->brief.isEmpty());
+ handleCommentBlock(docBlock.data(),current->brief.isEmpty());
BEGIN( docBlockContext );
}
/* ---- Comments blocks ------ */
<DocBlock>"*"*"*/" { // end of comment block
- handleCommentBlock(docBlock,FALSE);
+ handleCommentBlock(docBlock.data(),FALSE);
BEGIN(docBlockContext);
}
<DocBlock>^{B}*("//")?{B}*"*"+/[^//] { // start of a comment line
diff --git a/src/search_css.h b/src/search_css.h
index b0be070..0ef3863 100644
--- a/src/search_css.h
+++ b/src/search_css.h
@@ -19,7 +19,7 @@
" margin-top: 8px;\n"
" right: 0px;\n"
" width: 170px;\n"
-" z-index: 102;*/\n"
+" z-index: 102;\n"
"}\n"
"\n"
"#MSearchBox .left\n"
diff --git a/src/textdocvisitor.h b/src/textdocvisitor.h
index b1afb1a..081d57e 100644
--- a/src/textdocvisitor.h
+++ b/src/textdocvisitor.h
@@ -23,14 +23,14 @@
#include "docparser.h"
#include <qstack.h>
#include <qcstring.h>
-#include <qtextstream.h>
+#include "ftextstream.h"
/*! @brief Concrete visitor implementation for TEXT output. */
class TextDocVisitor : public DocVisitor
{
public:
- TextDocVisitor(QTextStream &t) : DocVisitor(DocVisitor_Text), m_t(t) {}
+ TextDocVisitor(FTextStream &t) : DocVisitor(DocVisitor_Text), m_t(t) {}
//--------------------------------------
// visitor functions for leaf nodes
@@ -127,7 +127,7 @@ class TextDocVisitor : public DocVisitor
void filter(const char *str);
- QTextStream &m_t;
+ FTextStream &m_t;
};
#endif
diff --git a/src/util.cpp b/src/util.cpp
index f6213cd..86e825e 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -131,7 +131,7 @@ void TextGeneratorOLImpl::writeLink(const char *extRef,const char *file,
const int maxInheritanceDepth = 100000;
/*!
- Removes all anoymous scopes from string s
+ Removes all anonymous scopes from string s
Possible examples:
\verbatim
"bla::@10::blep" => "bla::blep"
@@ -197,7 +197,7 @@ QCString replaceAnonymousScopes(const QCString &s,const char *replacement)
}
-// strip annonymous left hand side part of the scope
+// strip anonymous left hand side part of the scope
QCString stripAnonymousNamespaceScope(const QCString &s)
{
int i,p=0,l;
@@ -1251,7 +1251,7 @@ static void getResolvedSymbol(Definition *scope,
//printf(" bestMatch=%p bestResolvedType=%s\n",bestMatch,bestResolvedType.data());
}
-/* Find the fully qualified class name refered to by the input class
+/* Find the fully qualified class name referred to by the input class
* or typedef name against the input scope.
* Loops through scope and each of its parent scopes looking for a
* match against the input name. Can recursively call itself when
@@ -1429,7 +1429,7 @@ ClassDef *getResolvedClassRec(Definition *scope,
return bestMatch;
}
-/* Find the fully qualified class name refered to by the input class
+/* Find the fully qualified class name referred to by the input class
* or typedef name against the input scope.
* Loops through scope and each of its parent scopes looking for a
* match against the input name.
@@ -1465,7 +1465,7 @@ ClassDef *getResolvedClass(Definition *scope,
{
if (!mayBeHidden || !result->isHidden())
{
- result=0; // don't link to artifical/hidden classes unless explicitly allowed
+ result=0; // don't link to artificial/hidden classes unless explicitly allowed
}
}
//printf("getResolvedClass(%s,%s)=%s\n",scope?scope->name().data():"<global>",
@@ -1483,7 +1483,7 @@ static bool findOperator(const QCString &s,int i)
int b = s.findRev("operator",i);
if (b==-1) return FALSE; // not found
b+=8;
- while (b<i) // check if there are only spaces inbetween
+ while (b<i) // check if there are only spaces in between
// the operator and the >
{
if (!isspace((uchar)s.at(b))) return FALSE;
@@ -1509,17 +1509,53 @@ static bool findOperator2(const QCString &s,int i)
static const char constScope[] = { 'c', 'o', 'n', 's', 't', ':' };
static const char virtualScope[] = { 'v', 'i', 'r', 't', 'u', 'a', 'l', ':' };
+
+//#define ADD_CHAR(c) if (resultPos>=resultLen) { resultLen+=1024; result.resize(resultLen); }
+// result[resultPos++]=(c)
+
+class StrBuf
+{
+ public:
+ StrBuf() : str(0), pos(0), len(0) {}
+ ~StrBuf() { free(str); str=0; pos=0; len=0; }
+ void clear() { pos=0; }
+ void addChar(char c) { if (pos>=len) { len+=1024; str = (char*)realloc(str,len); }
+ str[pos++]=c;
+ }
+ void addStr(const char *s) {
+ int l=strlen(s);
+ if (pos+l>=len) { len+=l+1024; str = (char*)realloc(str,len); }
+ strcpy(&str[pos],s);
+ pos+=l;
+ }
+ const char *get() { return str; }
+ int getPos() const { return pos; }
+ char at(int i) const { return str[i]; }
+ private:
+ char *str;
+ int pos;
+ int len;
+};
+
+#define CLR_BUF() g_strBuf.clear()
+#define ADD_CHAR(c) g_strBuf.addChar(c)
+#define ADD_STR(s) g_strBuf.addStr(s)
+#define GET_STR() g_strBuf.get()
+#define STR_POS() g_strBuf.getPos()
+#define STR_AT(i) g_strBuf.at(i)
+
+// Not this function is not reentrant due to the use of static buffer!
QCString removeRedundantWhiteSpace(const QCString &s)
{
static bool cliSupport = Config_getBool("CPP_CLI_SUPPORT");
if (s.isEmpty()) return s;
- int resultLen = 1024;
- int resultPos = 0;
- QCString result(resultLen);
- // we use ADD_CHAR(c) instead of result+=c to
+ static StrBuf strBuf;
+ //int resultLen = 1024;
+ //int resultPos = 0;
+ //QCString result(resultLen);
+ // we use strBuf.addChar(c) instead of result+=c to
// improve the performance of this function
-#define ADD_CHAR(c) if (resultPos>=resultLen) { resultLen+=1024; result.resize(resultLen); } \
- result[resultPos++]=(c)
+ strBuf.clear();
uint i;
uint l=s.length();
uint csp=0;
@@ -1554,14 +1590,14 @@ nextChar:
if (c=='"') // quoted string
{
i++;
- ADD_CHAR(c);
+ strBuf.addChar(c);
while (i<l)
{
char cc=s.at(i);
- ADD_CHAR(cc);
+ strBuf.addChar(cc);
if (cc=='\\') // escaped character
{
- ADD_CHAR(s.at(i+1));
+ strBuf.addChar(s.at(i+1));
i+=2;
}
else if (cc=='"') // end of string
@@ -1575,24 +1611,24 @@ nextChar:
(i<8 || !findOperator(s,i)) // string in front is not "operator"
)
{
- ADD_CHAR('<');
- ADD_CHAR(' ');
+ strBuf.addChar('<');
+ strBuf.addChar(' ');
}
else if (i>0 && c=='>' && // current char is a >
(isId(s.at(i-1)) || isspace((uchar)s.at(i-1)) || s.at(i-1)=='*' || s.at(i-1)=='&') && // prev char is an id char or space
(i<8 || !findOperator(s,i)) // string in front is not "operator"
)
{
- ADD_CHAR(' ');
- ADD_CHAR('>');
+ strBuf.addChar(' ');
+ strBuf.addChar('>');
}
else if (i>0 && c==',' && !isspace((uchar)s.at(i-1))
&& ((i<l-1 && isId(s.at(i+1)))
|| (i<l-2 && s.at(i+1)=='$' && isId(s.at(i+2))) // for PHP
|| (i<l-3 && s.at(i+1)=='&' && s.at(i+2)=='$' && isId(s.at(i+3))))) // for PHP
{
- ADD_CHAR(',');
- ADD_CHAR(' ');
+ strBuf.addChar(',');
+ strBuf.addChar(' ');
}
else if (i>0 &&
((isId(s.at(i)) && s.at(i-1)==')') ||
@@ -1600,8 +1636,8 @@ nextChar:
)
)
{
- ADD_CHAR(' ');
- ADD_CHAR(s.at(i));
+ strBuf.addChar(' ');
+ strBuf.addChar(s.at(i));
}
else if (c=='t' && csp==5 /*&& (i<5 || !isId(s.at(i-5)))*/ &&
!(isId(s.at(i+1)) /*|| s.at(i+1)==' '*/ ||
@@ -1612,16 +1648,16 @@ nextChar:
)
// prevent const ::A from being converted to const::A
{
- ADD_CHAR('t');
- ADD_CHAR(' ');
+ strBuf.addChar('t');
+ strBuf.addChar(' ');
if (s.at(i+1)==' ') i++;
csp=0;
}
else if (c==':' && csp==6 /*&& (i<6 || !isId(s.at(i-6)))*/)
// replace const::A by const ::A
{
- ADD_CHAR(' ');
- ADD_CHAR(':');
+ strBuf.addChar(' ');
+ strBuf.addChar(':');
csp=0;
}
else if (c=='l' && vsp==7 /*&& (i<7 || !isId(s.at(i-7)))*/ &&
@@ -1633,16 +1669,16 @@ nextChar:
)
// prevent virtual ::A from being converted to virtual::A
{
- ADD_CHAR('l');
- ADD_CHAR(' ');
+ strBuf.addChar('l');
+ strBuf.addChar(' ');
if (s.at(i+1)==' ') i++;
vsp=0;
}
else if (c==':' && vsp==8 /*&& (i<8 || !isId(s.at(i-8)))*/)
// replace virtual::A by virtual ::A
{
- ADD_CHAR(' ');
- ADD_CHAR(':');
+ strBuf.addChar(' ');
+ strBuf.addChar(':');
vsp=0;
}
else if (!isspace((uchar)c) || // not a space
@@ -1656,28 +1692,28 @@ nextChar:
if (c=='*' || c=='&' || c=='@' || c=='$')
{
//uint rl=result.length();
- uint rl=resultPos;
- if ((rl>0 && (isId(result.at(rl-1)) || result.at(rl-1)=='>')) &&
+ uint rl=strBuf.getPos();
+ if ((rl>0 && (isId(strBuf.at(rl-1)) || strBuf.at(rl-1)=='>')) &&
((c!='*' && c!='&') || !findOperator2(s,i)) // avoid splitting operator* and operator->* and operator&
)
{
- ADD_CHAR(' ');
+ strBuf.addChar(' ');
}
}
- ADD_CHAR(c);
+ strBuf.addChar(c);
if (cliSupport &&
(c=='^' || c=='%') && i>1 && isId(s.at(i-1)) &&
!findOperator(s,i)
)
{
- ADD_CHAR(' '); // C++/CLI: Type^ name and Type% name
+ strBuf.addChar(' '); // C++/CLI: Type^ name and Type% name
}
}
}
//printf("removeRedundantWhiteSpace(`%s')=`%s'\n",s.data(),result.data());
- ADD_CHAR(0);
- result.resize(resultPos);
- return result;
+ strBuf.addChar(0);
+ //result.resize(resultPos);
+ return strBuf.get();
}
bool rightScopeMatch(const QCString &scope, const QCString &name)
@@ -2000,7 +2036,7 @@ void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId)
//----------------------------------------------------------------------------
-/*! takes the \a buf of the given lenght \a len and converts CR LF (DOS)
+/*! takes the \a buf of the given length \a len and converts CR LF (DOS)
* or CR (MAC) line ending to LF (Unix). Returns the length of the
* converted content (i.e. the same as \a len (Unix, MAC) or
* smaller (DOS).
@@ -2311,6 +2347,7 @@ int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level)
int m=maxInheritanceDepth;
if (cd->baseClasses())
{
+#if 0
BaseClassListIterator bcli(*cd->baseClasses());
for ( ; bcli.current() ; ++bcli)
{
@@ -2319,6 +2356,15 @@ int minClassDistance(const ClassDef *cd,const ClassDef *bcd,int level)
if (mc<m) m=mc;
if (m<0) break;
}
+#endif
+ BaseClassDef *bcdi = cd->baseClasses()->first();
+ while (bcdi)
+ {
+ int mc=minClassDistance(bcdi->classDef,bcd,level+1);
+ if (mc<m) m=mc;
+ if (m<0) break;
+ bcdi = cd->baseClasses()->next();
+ }
}
return m;
}
@@ -2683,9 +2729,9 @@ static bool matchArgument(const Argument *srcA,const Argument *dstA,
srcAType.stripPrefix("class ");
dstAType.stripPrefix("class ");
- // allow distingishing "const A" from "const B" even though
+ // allow distinguishing "const A" from "const B" even though
// from a syntactic point of view they would be two names of the same
- // type "const". This is not fool prove ofcourse, but should at least
+ // type "const". This is not fool prove of course, but should at least
// catch the most common cases.
if ((srcAType=="const" || srcAType=="volatile") && !srcAName.isEmpty())
{
@@ -3470,7 +3516,7 @@ void mergeArguments(ArgumentList *srcAl,ArgumentList *dstAl,bool forceNameOverwr
dstA->defval=srcA->defval.copy();
}
- // fix wrongly detected const or volatile specificiers before merging.
+ // fix wrongly detected const or volatile specifiers before merging.
// example: "const A *const" is detected as type="const A *" name="const"
if (srcA->name=="const" || srcA->name=="volatile")
{
@@ -3799,7 +3845,6 @@ bool getDefs(const QCString &scName,const QCString &memberName,
}
}
/* go to the parent scope */
-
if (scopeOffset==0)
{
scopeOffset=-1;
@@ -3810,7 +3855,6 @@ bool getDefs(const QCString &scName,const QCString &memberName,
}
} while (scopeOffset>=0);
- // unknown or undocumented scope
}
if (mn && scopeName.isEmpty() && mScope.isEmpty()) // Maybe a related function?
{
@@ -4082,7 +4126,8 @@ bool resolveRef(/* in */ const char *scName,
/* out */ Definition **resContext,
/* out */ MemberDef **resMember,
bool lookForSpecialization,
- FileDef *currentFile
+ FileDef *currentFile,
+ bool checkScope
)
{
QCString tsName = name;
@@ -4173,15 +4218,25 @@ bool resolveRef(/* in */ const char *scName,
GroupDef *gd = 0;
// check if nameStr is a member or global.
- //printf("getDefs(scope=%s,name=%s,args=%s)\n",scopeStr.data(),nameStr.data(),argsStr.data());
+ //printf("getDefs(scope=%s,name=%s,args=%s checkScope=%d)\n",
+ // scopeStr.data(),nameStr.data(),argsStr.data(),checkScope);
if (getDefs(scopeStr,nameStr,argsStr,
md,cd,fd,nd,gd,
- scopePos==0 && !memberScopeFirst,
+ scopePos==0 && !memberScopeFirst, // forceEmptyScope
currentFile,
- TRUE
+ TRUE // checkCV
)
)
{
+ if (checkScope && md && !cd && !nd && (!scopeStr.isEmpty() || nameStr.find("::")>0))
+ {
+ // we did find a member, but it is a global one while we were explicitly
+ // looking for a scoped variable. See bug 616387 for an example why this check is needed.
+ // note we do need to support autolinking to "::symbol" hence the >0
+ *resContext=0;
+ *resMember=0;
+ return FALSE;
+ }
//printf("after getDefs md=%p cd=%p fd=%p nd=%p gd=%p\n",md,cd,fd,nd,gd);
if (md) { *resMember=md; *resContext=md; }
else if (cd) *resContext=cd;
@@ -4211,7 +4266,7 @@ bool resolveRef(/* in */ const char *scName,
if (tryUnspecializedVersion)
{
- return resolveRef(scName,name,inSeeBlock,resContext,resMember,FALSE);
+ return resolveRef(scName,name,inSeeBlock,resContext,resMember,FALSE,0,checkScope);
}
return FALSE;
@@ -4486,7 +4541,7 @@ QCString substituteClassNames(const QCString &s)
#endif
//----------------------------------------------------------------------
-// substitute all occurences of `src' in `s' by `dst'
+// substitute all occurrences of `src' in `s' by `dst'
QCString substitute(const char *s,const char *src,const char *dst)
{
@@ -4577,7 +4632,7 @@ FileDef *findFileDef(const FileNameDict *fnDict,const char *n,bool &ambig)
return fd;
}
}
- else // file name alone is ambigious
+ else // file name alone is ambiguous
{
int count=0;
FileNameIterator fni(*fn);
@@ -4726,38 +4781,40 @@ bool hasVisibleRoot(BaseClassList *bcl)
//----------------------------------------------------------------------
+// note that this function is not reentrant due to the use of static strBuf!
QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscore)
{
static bool caseSenseNames = Config_getBool("CASE_SENSE_NAMES");
- QCString result;
+ static StrBuf strBuf;
+ strBuf.clear();
char c;
const char *p=name;
while ((c=*p++)!=0)
{
switch(c)
{
- case '_': if (allowUnderscore) result+="_"; else result+="__"; break;
- case '-': result+="-"; break;
- case ':': result+="_1"; break;
- case '/': result+="_2"; break;
- case '<': result+="_3"; break;
- case '>': result+="_4"; break;
- case '*': result+="_5"; break;
- case '&': result+="_6"; break;
- case '|': result+="_7"; break;
- case '.': if (allowDots) result+="."; else result+="_8"; break;
- case '!': result+="_9"; break;
- case ',': result+="_00"; break;
- case ' ': result+="_01"; break;
- case '{': result+="_02"; break;
- case '}': result+="_03"; break;
- case '?': result+="_04"; break;
- case '^': result+="_05"; break;
- case '%': result+="_06"; break;
- case '(': result+="_07"; break;
- case ')': result+="_08"; break;
- case '+': result+="_09"; break;
- case '=': result+="_0A"; break;
+ case '_': if (allowUnderscore) strBuf.addChar('_'); else strBuf.addStr("__"); break;
+ case '-': strBuf.addChar('-'); break;
+ case ':': strBuf.addStr("_1"); break;
+ case '/': strBuf.addStr("_2"); break;
+ case '<': strBuf.addStr("_3"); break;
+ case '>': strBuf.addStr("_4"); break;
+ case '*': strBuf.addStr("_5"); break;
+ case '&': strBuf.addStr("_6"); break;
+ case '|': strBuf.addStr("_7"); break;
+ case '.': if (allowDots) strBuf.addChar('.'); else strBuf.addStr("_8"); break;
+ case '!': strBuf.addStr("_9"); break;
+ case ',': strBuf.addStr("_00"); break;
+ case ' ': strBuf.addStr("_01"); break;
+ case '{': strBuf.addStr("_02"); break;
+ case '}': strBuf.addStr("_03"); break;
+ case '?': strBuf.addStr("_04"); break;
+ case '^': strBuf.addStr("_05"); break;
+ case '%': strBuf.addStr("_06"); break;
+ case '(': strBuf.addStr("_07"); break;
+ case ')': strBuf.addStr("_08"); break;
+ case '+': strBuf.addStr("_09"); break;
+ case '=': strBuf.addStr("_0A"); break;
default:
if (c<0)
{
@@ -4769,21 +4826,22 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor
ids[2]=map[id>>4];
ids[3]=map[id&0xF];
ids[4]=0;
- result+=ids;
+ strBuf.addStr(ids);
}
else if (caseSenseNames || !isupper(c))
{
- result+=c;
+ strBuf.addChar(c);
}
else
{
- result+="_";
- result+=tolower(c);
+ strBuf.addChar('_');
+ strBuf.addChar(tolower(c));
}
break;
}
}
- return result;
+ strBuf.addChar(0);
+ return strBuf.get();
}
/*! This function determines the file name on disk of an item
@@ -5117,38 +5175,41 @@ QCString stripScope(const char *name)
/*! Converts a string to an XML-encoded string */
QCString convertToXML(const char *s)
{
- QCString result;
- if (s==0) return result;
+ static StrBuf strBuf;
+ strBuf.clear();
+ if (s==0) return "";
const char *p=s;
char c;
while ((c=*p++))
{
switch (c)
{
- case '<': result+="&lt;"; break;
- case '>': result+="&gt;"; break;
- case '&': result+="&amp;"; break;
- case '\'': result+="&apos;"; break;
- case '"': result+="&quot;"; break;
- default: result+=c; break;
+ case '<': strBuf.addStr("&lt;"); break;
+ case '>': strBuf.addStr("&gt;"); break;
+ case '&': strBuf.addStr("&amp;"); break;
+ case '\'': strBuf.addStr("&apos;"); break;
+ case '"': strBuf.addStr("&quot;"); break;
+ default: strBuf.addChar(c); break;
}
}
- return result;
+ strBuf.addChar(0);
+ return strBuf.get();
}
/*! Converts a string to a HTML-encoded string */
QCString convertToHtml(const char *s,bool keepEntities)
{
- QCString result;
- if (s==0) return result;
+ static StrBuf strBuf;
+ strBuf.clear();
+ if (s==0) return "";
const char *p=s;
char c;
while ((c=*p++))
{
switch (c)
{
- case '<': result+="&lt;"; break;
- case '>': result+="&gt;"; break;
+ case '<': strBuf.addStr("&lt;"); break;
+ case '>': strBuf.addStr("&gt;"); break;
case '&': if (keepEntities)
{
const char *e=p;
@@ -5160,25 +5221,26 @@ QCString convertToHtml(const char *s,bool keepEntities)
if (ce==';') // found end of an entity
{
// copy entry verbatim
- result+=c;
- while (p<e) result+=*p++;
+ strBuf.addChar(c);
+ while (p<e) strBuf.addChar(*p++);
}
else
{
- result+="&amp;";
+ strBuf.addStr("&amp;");
}
}
else
{
- result+="&amp;";
+ strBuf.addStr("&amp;");
}
break;
- case '\'': result+="&#39;"; break;
- case '"': result+="&quot;"; break;
- default: result+=c; break;
+ case '\'': strBuf.addStr("&#39;"); break;
+ case '"': strBuf.addStr("&quot;"); break;
+ default: strBuf.addChar(c); break;
}
}
- return result;
+ strBuf.addChar(0);
+ return strBuf.get();
}
QCString convertCharEntitiesToUTF8(const QCString &s)
@@ -5764,7 +5826,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
pd->setReference(tagInfo->tagName);
}
- pd->setFileName(convertNameToFile(pd->name()));
+ pd->setFileName(convertNameToFile(pd->name(),FALSE,TRUE));
//printf("Appending page `%s'\n",baseName.data());
Doxygen::pageSDict->append(baseName,pd);
@@ -5865,7 +5927,7 @@ void addGroupListToTitle(OutputList &ol,Definition *d)
#if 0
/*!
- * Function converts Latin1 character to latex string representin the same
+ * Function converts Latin1 character to latex string representing the same
* character.
*/
static void latin1ToLatex(QTextStream &t,unsigned char c)
@@ -5941,7 +6003,7 @@ static void latin1ToLatex(QTextStream &t,unsigned char c)
}
/*!
- * Function converts Latin2 character to latex string representin the same
+ * Function converts Latin2 character to latex string representing the same
* character.
*/
static void latin2ToLatex(QTextStream &t,unsigned char c)
@@ -6054,149 +6116,76 @@ static void latin2ToLatex(QTextStream &t,unsigned char c)
}
#endif
-void filterLatexString(QTextStream &t,const char *str,
+void filterLatexString(FTextStream &t,const char *str,
bool insideTabbing,bool insidePre,bool insideItem)
{
- if (str)
+ if (str==0) return;
+ const unsigned char *p=(const unsigned char *)str;
+ unsigned char c;
+ unsigned char pc='\0';
+ while (*p)
{
- const unsigned char *p=(const unsigned char *)str;
- unsigned char c;
- unsigned char pc='\0';
- while (*p)
- {
- c=*p++;
+ c=*p++;
- if (insidePre)
+ if (insidePre)
+ {
+ switch(c)
{
- switch(c)
- {
- case '\\': t << "\\(\\backslash\\)"; break;
- case '{': t << "\\{"; break;
- case '}': t << "\\}"; break;
- case '_': t << "\\_"; break;
- default:
- t << (char)c;
- }
+ case '\\': t << "\\(\\backslash\\)"; break;
+ case '{': t << "\\{"; break;
+ case '}': t << "\\}"; break;
+ case '_': t << "\\_"; break;
+ default:
+ t << (char)c;
}
- else
- {
- switch(c)
- {
- case '#': t << "\\#"; break;
- case '$': t << "\\$"; break;
- case '%': t << "\\%"; break;
- case '^': t << "$^\\wedge$"; break;
- case '&': t << "\\&"; break;
- case '*': t << "$\\ast$"; break;
- case '_': t << "\\_";
- if (!insideTabbing) t << "\\-";
- break;
- case '{': t << "\\{"; break;
- case '}': t << "\\}"; break;
- case '<': t << "$<$"; break;
- case '>': t << "$>$"; break;
- case '|': t << "$|$"; break;
- case '~': t << "$\\sim$"; break;
- case '[': if (Config_getBool("PDF_HYPERLINKS") || insideItem)
- t << "\\mbox{[}";
+ }
+ else
+ {
+ switch(c)
+ {
+ case '#': t << "\\#"; break;
+ case '$': t << "\\$"; break;
+ case '%': t << "\\%"; break;
+ case '^': t << "$^\\wedge$"; break;
+ case '&': t << "\\&"; break;
+ case '*': t << "$\\ast$"; break;
+ case '_': t << "\\_";
+ if (!insideTabbing) t << "\\-";
+ break;
+ case '{': t << "\\{"; break;
+ case '}': t << "\\}"; break;
+ case '<': t << "$<$"; break;
+ case '>': t << "$>$"; break;
+ case '|': t << "$|$"; break;
+ case '~': t << "$\\sim$"; break;
+ case '[': if (Config_getBool("PDF_HYPERLINKS") || insideItem)
+ t << "\\mbox{[}";
+ else
+ t << "[";
+ break;
+ case ']': if (pc=='[') t << "$\\,$";
+ if (Config_getBool("PDF_HYPERLINKS") || insideItem)
+ t << "\\mbox{]}";
else
- t << "[";
- break;
- case ']': if (pc=='[') t << "$\\,$";
- if (Config_getBool("PDF_HYPERLINKS") || insideItem)
- t << "\\mbox{]}";
- else
- t << "]";
- break;
- case '-': t << "-\\/";
- break;
- case '\\': if (*p=='<')
- { t << "$<$"; p++; }
- else if (*p=='>')
- { t << "$>$"; p++; }
- else
- { t << "$\\backslash$"; }
- break;
- case '"': { t << "\\char`\\\"{}"; }
- break;
-
- default:
- t << (char)c;
-#if 0
- {
- // Some languages use wide characters
- if (isJapanese || isKorean || isChinese || isSerbian)
- {
- if (c>=128)
- {
- t << (char)c;
- if (*p)
- {
- c = *p++;
- t << (char)c;
- }
- }
- else // ascii char => see if we can insert a hypenation hint
- {
- if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-";
- t << (char)c;
- }
- }
- else if (isCzech || isRussian || isUkrainian || isSlovene)
- {
- if (c>=128)
- {
- t << (char)c;
- }
- else // ascii char => see if we can insert a hypenation hint
- {
- if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-";
- t << (char)c;
- }
- }
- else if (isGreek)
- {
- if (c<128)
- {
- t << "\\textlatin{" << (char)c << "}";
- }
- else
- {
- t << (char)c;
- }
- }
- else if (isLatin2)
- {
- if (c>=128)
- {
- latin2ToLatex(t,c);
- }
- else
- {
- // see if we can insert an hyphenation hint
- if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-";
- t << (char)c;
- }
- }
- else // another language => assume latin1 charset
- {
- if (c>=128)
- {
- latin1ToLatex(t,c);
- }
- else
- {
- // see if we can insert an hyphenation hint
- if (isupper(c) && islower(pc) && !insideTabbing) t << "\\-";
- t << (char)c;
- }
- }
- }
-#endif
- }
+ t << "]";
+ break;
+ case '-': t << "-\\/";
+ break;
+ case '\\': if (*p=='<')
+ { t << "$<$"; p++; }
+ else if (*p=='>')
+ { t << "$>$"; p++; }
+ else
+ { t << "$\\backslash$"; }
+ break;
+ case '"': { t << "\\char`\\\"{}"; }
+ break;
+
+ default:
+ t << (char)c;
}
- pc = c;
}
+ pc = c;
}
}
@@ -6401,7 +6390,7 @@ g_lang2extMap[] =
bool updateLanguageMapping(const QCString &extension,const QCString &language)
{
- //getLanguageFromFileName("dummy"); // force initializion of the g_extLookup map
+ //getLanguageFromFileName("dummy"); // force initialization of the g_extLookup map
const Lang2ExtMap *p = g_lang2extMap;
QCString langName = language.lower();
while (p->langName)
@@ -6552,23 +6541,24 @@ bool checkIfTypedef(Definition *scope,FileDef *fileScope,const char *n)
}
QCString parseCommentAsText(const Definition *scope,const MemberDef *md,
- const QString &doc,const QCString &fileName,int lineNr)
+ const QCString &doc,const QCString &fileName,int lineNr)
{
- QString result;
- if (doc.isEmpty()) return result.data();
- QTextStream t(&result,IO_WriteOnly);
+ QGString s;
+ if (doc.isEmpty()) return s.data();
+ FTextStream t(&s);
DocNode *root = validatingParseDoc(fileName,lineNr,
(Definition*)scope,(MemberDef*)md,doc,FALSE,FALSE);
TextDocVisitor *visitor = new TextDocVisitor(t);
root->accept(visitor);
delete visitor;
delete root;
+ QCString result = s.data();
int i=0;
if (result.length()>80)
{
for (i=80;i<100;i++) // search for nice truncation point
{
- if (result.at(i).isSpace() ||
+ if (isspace(result.at(i)) ||
result.at(i)==',' ||
result.at(i)=='.' ||
result.at(i)=='?')
@@ -6662,6 +6652,8 @@ static QCString replaceAliasArgument(const QCString &aliasValue,int paramNum,
}
}
result+=aliasValue.right(aliasValue.length()-p);
+ result = substitute(result,"\\{","{");
+ result = substitute(result,"\\}","}");
result = expandAliasRec(substitute(result,"\\,",","));
//printf("replaceAliasArgument('%s',%d,'%s')->%s\n",
// aliasValue.data(),paramNum,paramValue.data(),result.data());
@@ -6705,12 +6697,22 @@ QCString extractAliasArgs(const QCString &args,int pos)
{
int i;
int bc=0;
+ char prevChar=0;
if (args.at(pos)=='{') // alias has argument
{
for (i=pos;i<(int)args.length();i++)
{
- if (args.at(i)=='{') bc++;
- if (args.at(i)=='}') bc--;
+ if (prevChar!='\\')
+ {
+ if (args.at(i)=='{') bc++;
+ if (args.at(i)=='}') bc--;
+ prevChar=args.at(i);
+ }
+ else
+ {
+ prevChar=0;
+ }
+
if (bc==0)
{
//printf("extractAliasArgs('%s')->'%s'\n",args.data(),args.mid(pos+1,i-pos-1).data());
@@ -6964,9 +6966,9 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList)
#else // unix
QRegExp re(pattern,TRUE,TRUE); // case sensitive match
#endif
- found = found || re.match(fi.fileName())!=-1 ||
- re.match(fi.filePath())!=-1 ||
- re.match(fi.absFilePath())!=-1;
+ found = found || re.match(fi.fileName().data())!=-1 ||
+ re.match(fi.filePath().data())!=-1 ||
+ re.match(fi.absFilePath().data())!=-1;
//printf("Matching `%s' against pattern `%s' found=%d\n",
// fi->fileName().data(),pattern.data(),found);
}
diff --git a/src/util.h b/src/util.h
index d20b30b..8aa8ef5 100644
--- a/src/util.h
+++ b/src/util.h
@@ -56,6 +56,7 @@ class Definition;
class BufStr;
class QFileInfo;
class QStrList;
+class FTextStream;
//--------------------------------------------------------------------
@@ -141,7 +142,8 @@ bool resolveRef(/* in */ const char *scName,
/* out */ Definition **resContext,
/* out */ MemberDef **resMember,
/* in */ bool lookForSpecializations = TRUE,
- /* in */ FileDef *currentFile = 0
+ /* in */ FileDef *currentFile = 0,
+ /* in */ bool checkScope = FALSE
);
bool resolveLink(/* in */ const char *scName,
@@ -297,7 +299,7 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor
void addGroupListToTitle(OutputList &ol,Definition *d);
-void filterLatexString(QTextStream &t,const char *str,
+void filterLatexString(FTextStream &t,const char *str,
bool insideTabbing=FALSE,bool insidePre=FALSE,
bool insideItem=FALSE);
@@ -345,7 +347,7 @@ ClassDef *newResolveTypedef(FileDef *fileScope,MemberDef *md,
QCString *pResolvedType=0,
ArgumentList *actTemplParams=0);
-QCString parseCommentAsText(const Definition *scope,const MemberDef *member,const QString &doc,const QCString &fileName,int lineNr);
+QCString parseCommentAsText(const Definition *scope,const MemberDef *member,const QCString &doc,const QCString &fileName,int lineNr);
QCString transcodeCharacterStringToUTF8(const QCString &input);
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index d9b33d2..cbe3c1d 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -28,7 +28,7 @@
#include <qfileinfo.h>
#include "parserintf.h"
-XmlDocVisitor::XmlDocVisitor(QTextStream &t,CodeOutputInterface &ci)
+XmlDocVisitor::XmlDocVisitor(FTextStream &t,CodeOutputInterface &ci)
: DocVisitor(DocVisitor_XML), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE)
{
}
@@ -179,7 +179,7 @@ void XmlDocVisitor::visit(DocVerbatim *s)
case DocVerbatim::Code: // fall though
m_t << "<programlisting>";
Doxygen::parserManager->getParser(m_langExt)
- ->parseCode(m_ci,s->context(),s->text().latin1(),
+ ->parseCode(m_ci,s->context(),s->text(),
s->isExample(),s->exampleFile());
m_t << "</programlisting>";
break;
@@ -237,7 +237,7 @@ void XmlDocVisitor::visit(DocInclude *inc)
FileDef fd( cfi.dirPath(), cfi.fileName() );
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
- inc->text().latin1(),
+ inc->text(),
inc->isExample(),
inc->exampleFile(), &fd);
m_t << "</programlisting>";
@@ -247,7 +247,7 @@ void XmlDocVisitor::visit(DocInclude *inc)
m_t << "<programlisting>";
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
- inc->text().latin1(),
+ inc->text(),
inc->isExample(),
inc->exampleFile());
m_t << "</programlisting>";
@@ -287,7 +287,7 @@ void XmlDocVisitor::visit(DocIncOperator *op)
{
Doxygen::parserManager->getParser(m_langExt)
->parseCode(m_ci,op->context(),
- op->text().latin1(),op->isExample(),
+ op->text(),op->isExample(),
op->exampleFile());
}
pushEnabled();
@@ -656,7 +656,7 @@ void XmlDocVisitor::visitPre(DocImage *img)
}
m_t << "\"";
- QString baseName=img->name();
+ QCString baseName=img->name();
int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{
@@ -679,7 +679,7 @@ void XmlDocVisitor::visitPre(DocImage *img)
// copy the image to the output dir
QFile inImage(img->name());
- QFile outImage(Config_getString("XML_OUTPUT")+"/"+baseName.ascii());
+ QFile outImage(Config_getString("XML_OUTPUT")+"/"+baseName.data());
if (inImage.open(IO_ReadOnly))
{
if (outImage.open(IO_WriteOnly))
@@ -907,7 +907,7 @@ void XmlDocVisitor::filter(const char *str)
m_t << convertToXML(str);
}
-void XmlDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
+void XmlDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor)
{
m_t << "<ref refid=\"" << file;
if (!anchor.isEmpty()) m_t << "_1" << anchor;
diff --git a/src/xmldocvisitor.h b/src/xmldocvisitor.h
index 4662b04..89001aa 100644
--- a/src/xmldocvisitor.h
+++ b/src/xmldocvisitor.h
@@ -23,15 +23,15 @@
#include <qstack.h>
#include <qcstring.h>
-class QTextStream;
+class FTextStream;
class CodeOutputInterface;
-class QString;
+class QCString;
/*! @brief Concrete visitor implementation for XML output. */
class XmlDocVisitor : public DocVisitor
{
public:
- XmlDocVisitor(QTextStream &t,CodeOutputInterface &ci);
+ XmlDocVisitor(FTextStream &t,CodeOutputInterface &ci);
//--------------------------------------
// visitor functions for leaf nodes
@@ -135,8 +135,8 @@ class XmlDocVisitor : public DocVisitor
//--------------------------------------
void filter(const char *str);
- void startLink(const QString &ref,const QString &file,
- const QString &anchor);
+ void startLink(const QCString &ref,const QCString &file,
+ const QCString &anchor);
void endLink();
void pushEnabled();
@@ -146,7 +146,7 @@ class XmlDocVisitor : public DocVisitor
// state variables
//--------------------------------------
- QTextStream &m_t;
+ FTextStream &m_t;
CodeOutputInterface &m_ci;
bool m_insidePre;
bool m_hide;
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 400180e..e6bb475 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -108,12 +108,12 @@ class XmlSectionMapper : public QIntDict<char>
static XmlSectionMapper g_xmlSectionMapper;
-inline void writeXMLString(QTextStream &t,const char *s)
+inline void writeXMLString(FTextStream &t,const char *s)
{
t << convertToXML(s);
}
-inline void writeXMLCodeString(QTextStream &t,const char *s, int &col)
+inline void writeXMLCodeString(FTextStream &t,const char *s, int &col)
{
char c;
while ((c=*s++))
@@ -140,7 +140,7 @@ inline void writeXMLCodeString(QTextStream &t,const char *s, int &col)
}
-static void writeXMLHeader(QTextStream &t)
+static void writeXMLHeader(FTextStream &t)
{
t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;
t << "<doxygen xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ";
@@ -158,8 +158,8 @@ static void writeCombineScript()
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
t <<
"<!-- XSLT script to combine the generated output into a single file. \n"
@@ -180,7 +180,7 @@ static void writeCombineScript()
}
-void writeXMLLink(QTextStream &t,const char *extRef,const char *compoundId,
+void writeXMLLink(FTextStream &t,const char *extRef,const char *compoundId,
const char *anchorId,const char *text,const char *tooltip)
{
t << "<ref refid=\"" << compoundId;
@@ -198,7 +198,7 @@ void writeXMLLink(QTextStream &t,const char *extRef,const char *compoundId,
class TextGeneratorXMLImpl : public TextGeneratorIntf
{
public:
- TextGeneratorXMLImpl(QTextStream &t): m_t(t) {}
+ TextGeneratorXMLImpl(FTextStream &t): m_t(t) {}
void writeString(const char *s,bool /*keepSpaces*/) const
{
writeXMLString(m_t,s);
@@ -211,7 +211,7 @@ class TextGeneratorXMLImpl : public TextGeneratorIntf
writeXMLLink(m_t,extRef,file,anchor,text,0);
}
private:
- QTextStream &m_t;
+ FTextStream &m_t;
};
template<class T> class ValStack
@@ -272,7 +272,7 @@ class XMLCodeGenerator : public CodeOutputInterface
{
public:
- XMLCodeGenerator(QTextStream &t) : m_t(t), m_lineNumber(-1),
+ XMLCodeGenerator(FTextStream &t) : m_t(t), m_lineNumber(-1),
m_insideCodeLine(FALSE), m_normalHLNeedStartTag(TRUE),
m_insideSpecialHL(FALSE) {}
virtual ~XMLCodeGenerator() { }
@@ -403,7 +403,7 @@ class XMLCodeGenerator : public CodeOutputInterface
}
private:
- QTextStream &m_t;
+ FTextStream &m_t;
QCString m_refId;
QCString m_external;
int m_lineNumber;
@@ -417,7 +417,7 @@ class XMLCodeGenerator : public CodeOutputInterface
static void writeTemplateArgumentList(ArgumentList *al,
- QTextStream &t,
+ FTextStream &t,
Definition *scope,
FileDef *fileScope,
int indent)
@@ -455,7 +455,7 @@ static void writeTemplateArgumentList(ArgumentList *al,
}
}
-static void writeMemberTemplateLists(MemberDef *md,QTextStream &t)
+static void writeMemberTemplateLists(MemberDef *md,FTextStream &t)
{
LockingPtr<ArgumentList> templMd = md->templateArguments();
if (templMd!=0) // function template prefix
@@ -464,12 +464,12 @@ static void writeMemberTemplateLists(MemberDef *md,QTextStream &t)
}
}
-static void writeTemplateList(ClassDef *cd,QTextStream &t)
+static void writeTemplateList(ClassDef *cd,FTextStream &t)
{
writeTemplateArgumentList(cd->templateArguments(),t,cd,0,4);
}
-static void writeXMLDocBlock(QTextStream &t,
+static void writeXMLDocBlock(FTextStream &t,
const QCString &fileName,
int lineNr,
Definition *scope,
@@ -493,7 +493,7 @@ static void writeXMLDocBlock(QTextStream &t,
}
-void writeXMLCodeBlock(QTextStream &t,FileDef *fd)
+void writeXMLCodeBlock(FTextStream &t,FileDef *fd)
{
ParserInterface *pIntf=Doxygen::parserManager->getParser(fd->getDefFileExtension());
pIntf->resetCodeParserState();
@@ -508,7 +508,7 @@ void writeXMLCodeBlock(QTextStream &t,FileDef *fd)
delete xmlGen;
}
-static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,const char *tagName)
+static void writeMemberReference(FTextStream &t,Definition *def,MemberDef *rmd,const char *tagName)
{
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
@@ -544,7 +544,7 @@ static void stripQualifiers(QCString &typeStr)
}
}
-static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def)
+static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,Definition *def)
{
// + declaration/definition arg lists
@@ -976,7 +976,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
t << " </memberdef>" << endl;
}
-static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
+static void generateXMLSection(Definition *d,FTextStream &ti,FTextStream &t,
MemberList *ml,const char *kind,const char *header=0,
const char *documentation=0)
{
@@ -1018,7 +1018,7 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
t << " </sectiondef>" << endl;
}
-static void writeListOfAllMembers(ClassDef *cd,QTextStream &t)
+static void writeListOfAllMembers(ClassDef *cd,FTextStream &t)
{
t << " <listofallmembers>" << endl;
if (cd->memberNameInfoSDict())
@@ -1066,7 +1066,7 @@ static void writeListOfAllMembers(ClassDef *cd,QTextStream &t)
t << " </listofallmembers>" << endl;
}
-static void writeInnerClasses(const ClassSDict *cl,QTextStream &t)
+static void writeInnerClasses(const ClassSDict *cl,FTextStream &t)
{
if (cl)
{
@@ -1091,7 +1091,7 @@ static void writeInnerClasses(const ClassSDict *cl,QTextStream &t)
}
}
-static void writeInnerNamespaces(const NamespaceSDict *nl,QTextStream &t)
+static void writeInnerNamespaces(const NamespaceSDict *nl,FTextStream &t)
{
if (nl)
{
@@ -1108,7 +1108,7 @@ static void writeInnerNamespaces(const NamespaceSDict *nl,QTextStream &t)
}
}
-static void writeInnerFiles(const FileList *fl,QTextStream &t)
+static void writeInnerFiles(const FileList *fl,FTextStream &t)
{
if (fl)
{
@@ -1122,7 +1122,7 @@ static void writeInnerFiles(const FileList *fl,QTextStream &t)
}
}
-static void writeInnerPages(const PageSDict *pl,QTextStream &t)
+static void writeInnerPages(const PageSDict *pl,FTextStream &t)
{
if (pl)
{
@@ -1140,7 +1140,7 @@ static void writeInnerPages(const PageSDict *pl,QTextStream &t)
}
}
-static void writeInnerGroups(const GroupList *gl,QTextStream &t)
+static void writeInnerGroups(const GroupList *gl,FTextStream &t)
{
if (gl)
{
@@ -1155,7 +1155,7 @@ static void writeInnerGroups(const GroupList *gl,QTextStream &t)
}
}
-static void writeInnerDirs(const DirList *dl,QTextStream &t)
+static void writeInnerDirs(const DirList *dl,FTextStream &t)
{
if (dl)
{
@@ -1170,7 +1170,7 @@ static void writeInnerDirs(const DirList *dl,QTextStream &t)
}
-static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
+static void generateXMLForClass(ClassDef *cd,FTextStream &ti)
{
// + brief description
// + detailed description
@@ -1207,8 +1207,8 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\""
@@ -1408,7 +1408,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
ti << " </compound>" << endl;
}
-static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
+static void generateXMLForNamespace(NamespaceDef *nd,FTextStream &ti)
{
// + contained class definitions
// + contained namespace definitions
@@ -1433,8 +1433,8 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\""
@@ -1490,7 +1490,7 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
ti << " </compound>" << endl;
}
-static void generateXMLForFile(FileDef *fd,QTextStream &ti)
+static void generateXMLForFile(FileDef *fd,FTextStream &ti)
{
// + includes files
// + includedby files
@@ -1520,8 +1520,8 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\""
@@ -1637,7 +1637,7 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
ti << " </compound>" << endl;
}
-static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
+static void generateXMLForGroup(GroupDef *gd,FTextStream &ti)
{
// + members
// + member groups
@@ -1665,8 +1665,8 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
return;
}
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\""
<< gd->getOutputFileBase() << "\" kind=\"group\">" << endl;
@@ -1720,7 +1720,7 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
ti << " </compound>" << endl;
}
-static void generateXMLForDir(DirDef *dd,QTextStream &ti)
+static void generateXMLForDir(DirDef *dd,FTextStream &ti)
{
if (dd->isReference()) return; // skip external references
ti << " <compound refid=\"" << dd->getOutputFileBase()
@@ -1736,8 +1736,8 @@ static void generateXMLForDir(DirDef *dd,QTextStream &ti)
return;
}
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\""
<< dd->getOutputFileBase() << "\" kind=\"dir\">" << endl;
@@ -1759,7 +1759,7 @@ static void generateXMLForDir(DirDef *dd,QTextStream &ti)
ti << " </compound>" << endl;
}
-static void generateXMLForPage(PageDef *pd,QTextStream &ti,bool isExample)
+static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
{
// + name
// + title
@@ -1789,8 +1789,8 @@ static void generateXMLForPage(PageDef *pd,QTextStream &ti,bool isExample)
return;
}
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
writeXMLHeader(t);
t << " <compounddef id=\"" << pageName;
t << "\" kind=\"" << kindName << "\">" << endl;
@@ -1898,8 +1898,8 @@ void generateXML()
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
- QTextStream t(&f);
- t.setEncoding(QTextStream::UnicodeUTF8);
+ FTextStream t(&f);
+ //t.setEncoding(FTextStream::UnicodeUTF8);
// write index header
t << "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" << endl;;