diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 2 | ||||
-rw-r--r-- | src/doxygen.cpp | 53 | ||||
-rw-r--r-- | src/scanner.l | 5 | ||||
-rw-r--r-- | src/util.cpp | 5 | ||||
-rw-r--r-- | src/xmlgen.cpp | 17 |
5 files changed, 48 insertions, 34 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp index b32d5a8..c36a83f 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -249,7 +249,7 @@ void ClassDefImpl::init(const char *defFileName, const char *name, { isLocal=FALSE; } - isGeneric = lang==SrcLangExt_CSharp && QCString(name).find('<')!=-1; + isGeneric = (lang==SrcLangExt_CSharp || lang==SrcLangExt_Java) && QCString(name).find('<')!=-1; isAnonymous = QCString(name).find('@')!=-1; } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 0c0e0d6..168725d 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1347,11 +1347,12 @@ static void addClassToContext(EntryNav *rootNav) cd->insertUsedFile(fd); // add class to the list - //printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data()); + //printf("ClassDict.insert(%s)\n",fullName.data()); Doxygen::classSDict->append(fullName,cd); if (cd->isGeneric()) // generics are also stored in a separate dictionary for fast lookup of instantions { + //printf("inserting generic '%s' cd=%p\n",fullName.data(),cd); Doxygen::genericsDict->insert(fullName,cd); } } @@ -4113,7 +4114,9 @@ static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,co { result = getClass(name); } - if (result==0 && cd && cd->getLanguage()==SrcLangExt_CSharp && name.find('<')!=-1) + if (result==0 && cd && + (cd->getLanguage()==SrcLangExt_CSharp || cd->getLanguage()==SrcLangExt_Java) && + name.find('<')!=-1) { result = Doxygen::genericsDict->find(name); } @@ -4638,34 +4641,32 @@ static bool findClassRelation( int i=baseClassName.find('<'); int si=baseClassName.findRev("::",i==-1 ? baseClassName.length() : i); if (si==-1) si=0; + if (baseClass==0 && (root->lang==SrcLangExt_CSharp || root->lang==SrcLangExt_Java)) + { + baseClass = Doxygen::genericsDict->find(baseClassName); + //printf("looking for '%s' result=%p\n",baseClassName.data(),baseClass); + } if (baseClass==0 && i!=-1) // base class has template specifiers { - if (root->lang == SrcLangExt_CSharp) - { - baseClass = Doxygen::genericsDict->find(baseClassName); - } - else + // TODO: here we should try to find the correct template specialization + // but for now, we only look for the unspecializated base class. + int e=findEndOfTemplate(baseClassName,i+1); + //printf("baseClass==0 i=%d e=%d\n",i,e); + if (e!=-1) // end of template was found at e { - // TODO: here we should try to find the correct template specialization - // but for now, we only look for the unspecializated base class. - int e=findEndOfTemplate(baseClassName,i+1); - //printf("baseClass==0 i=%d e=%d\n",i,e); - if (e!=-1) // end of template was found at e - { - templSpec=removeRedundantWhiteSpace(baseClassName.mid(i,e-i)); - baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e); - baseClass=getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context, - cd->getFileDef(), - baseClassName, - &baseClassTypeDef, - 0, //&templSpec, - mode==Undocumented, - TRUE - ); - //printf("baseClass=%p -> baseClass=%s templSpec=%s\n", - // baseClass,baseClassName.data(),templSpec.data()); - } + templSpec=removeRedundantWhiteSpace(baseClassName.mid(i,e-i)); + baseClassName=baseClassName.left(i)+baseClassName.right(baseClassName.length()-e); + baseClass=getResolvedClass(explicitGlobalScope ? Doxygen::globalScope : context, + cd->getFileDef(), + baseClassName, + &baseClassTypeDef, + 0, //&templSpec, + mode==Undocumented, + TRUE + ); + //printf("baseClass=%p -> baseClass=%s templSpec=%s\n", + // baseClass,baseClassName.data(),templSpec.data()); } } else if (baseClass && !templSpec.isEmpty()) // we have a known class, but also diff --git a/src/scanner.l b/src/scanner.l index 5b698cc..8370f13 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2245,7 +2245,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) <FindMembers>"Q_OBJECT" { // Qt object macro } <FindMembers>"Q_PROPERTY" { // Qt property declaration - current->protection = protection = Public ; + //current->protection = protection = Public ; // see bug734245 current->mtype = mtype = Property; current->type.resize(0); BEGIN(QtPropType); @@ -3372,6 +3372,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } else { + mtype = Method; + virt = Normal; if (needNewCurrent) { current = new Entry ; @@ -6126,6 +6128,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) else { mtype = Method; + virt = Normal; unput(';'); BEGIN(FindMembers); } diff --git a/src/util.cpp b/src/util.cpp index 0049098..a524922 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -5605,6 +5605,11 @@ QCString convertToXML(const char *s) case '&': growBuf.addStr("&"); break; case '\'': growBuf.addStr("'"); break; case '"': growBuf.addStr("""); break; + case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: + case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: + case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: + case 27: case 28: case 29: case 30: case 31: + break; // skip invalid XML characters (see http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char) default: growBuf.addChar(c); break; } } diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index c9fe950..549ff0f 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -129,10 +129,10 @@ inline void writeXMLCodeString(FTextStream &t,const char *s, int &col) { switch(c) { - case '\t': - { + case '\t': + { static int tabSize = Config_getInt("TAB_SIZE"); - int spacesToNextTabStop = tabSize - (col%tabSize); + int spacesToNextTabStop = tabSize - (col%tabSize); col+=spacesToNextTabStop; while (spacesToNextTabStop--) t << "<sp/>"; break; @@ -141,11 +141,16 @@ inline void writeXMLCodeString(FTextStream &t,const char *s, int &col) case '<': t << "<"; col++; break; case '>': t << ">"; col++; break; case '&': t << "&"; col++; break; - case '\'': t << "'"; col++; break; + case '\'': t << "'"; col++; break; case '"': t << """; col++; break; - default: s=writeUtf8Char(t,s-1); col++; break; + case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: + case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: + case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: + case 27: case 28: case 29: case 30: case 31: + break; // skip invalid XML characters (see http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char) + default: s=writeUtf8Char(t,s-1); col++; break; } - } + } } |